from random import randrange
for n in range(10):
r = randrange(0,10)
if n=r: continue # there should be ==
if n>r: break
print n # should be "\n" ?
else:
print "wow, you are lucky!\n" # Yes, you are! Your python interpreter can make miracles :). Try to run me.append(SexyChick(10)) and let's see what happens!
for...else
конструкция действительно действительна. Ветвь else
выполняется, если цикл не был завершен break
. Смотрите здесь .