Quick and Painless Tutorial (cont) >>> # Fibonacci series: ... # the sum of two elements defines the next ... a, b = 0, 1 >>> while b < 10: ... print b, ... a, b = b, a+b 1 1 2 3 5 8 # control flow: a = raw_input("please enter a number: "); if (a < 3): print "too low, joe" elif (a >7): print "too big, nick" else: print "you win, jim" lst = ['aaaa', 'bv', 'ccc'] for s in lst: print s, len(s) # range(a,b) generates a list of numbers from a (inclusive) # to b (exclusive). the first parameter defaults to 0. range(2) == [0,1] # break and continue work like in c # pass when waiting for an external event or to do nothing