Skip to content

Instantly share code, notes, and snippets.

@agiliq
Created December 12, 2009 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agiliq/254892 to your computer and use it in GitHub Desktop.
Save agiliq/254892 to your computer and use it in GitHub Desktop.
In [1]: '' in 'abc'
Out[1]: True
In [2]: [] in [1, 2, 3,] #If empty sequence in sequence is True, why is this false?
Out[2]: False
In [3]: '' in [1, 2, 3,]
Out[3]: False
In [4]: x = 'abc'
In [5]: x.find('')
Out[5]: 0
In [6]: x.find('a')
Out[6]: 0
#so '' == 'a'?
In [7]: x.find('b')
Out[7]: 1
In [8]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment