def x(foo):
return str(foo)
print x("stooge")
print x(1000)
print x(['stooge', "stooge"])
def x(foo):
return str(foo)
def y(bar):
return list(bar)
print y("a little string")
print y([1,2,3,])
print y(x(1000))
for x in [0, "", " ", [], 1, (0,)]:
if x:
print "Here?"
else:
print "Or here?"
x,y,z = 1,2,3
first, second = second, first
a = b = 123
c = 50
print (10 < c < 100)
x = 11
if x < 5 or (x > 10 and x < 20):
print "The value is OK."
if x < 5 or 10 < x < 20:
print "The value is OK."
for i in [1,2,3,4,5]:
print "This is iteration number", i
x = 10
while x >= 0:
print "x is still not negative."
x = x-1