3 Replies - 347 Views - Last Post: 02 August 2012 - 02:32 PM Rate Topic: -----

#1 Region  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-July 12

Simple question

Posted 02 August 2012 - 01:59 PM

Sorry about how amateur this is, but what does the '!' do in python? I see it all the time and wonder.
Is This A Good Question/Topic? 0
  • +

Replies To: Simple question

#2 Nallo  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 163
  • View blog
  • Posts: 255
  • Joined: 19-July 09

Re: Simple question

Posted 02 August 2012 - 02:02 PM

All the time? Where do you see it? I can only think of one place where it occurs often:

a != b



meaning a not equal to b.
Was This Post Helpful? 0
  • +
  • -

#3 Region  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 27-July 12

Re: Simple question

Posted 02 August 2012 - 02:09 PM

Just looking through the snippets and posts I'll see it.
Was This Post Helpful? 0
  • +
  • -

#4 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7576
  • View blog
  • Posts: 12,733
  • Joined: 19-March 11

Re: Simple question

Posted 02 August 2012 - 02:32 PM

You might also see it in the sh-bang:


#!/usr/bin/python


There, it tells the shell to interpret this with python (and not with your default shell).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1