adding the 'in' operator

This commit is contained in:
Jeremy Ashkenas
2010-01-05 23:29:43 -05:00
parent 0275e7775f
commit 4fc40e4841
2 changed files with 5 additions and 0 deletions

View File

@@ -19,3 +19,7 @@ evens: for num in [1, 2, 3, 4, 5, 6] when num % 2 is 0
print(evens.join(', ') is '4, 6, 8')
# Make sure that the "in" operator still works.
print(2 in evens)