import random while random.randrange(10) != 8: pass print '8'