Baba wrote: > I am working on a simple wordgame exercise: 2 players form a word by > alternating turns saying a letter, which is added on to the end of the > word fragment. > > I am familiar with loops, iterations etc but i need a hint as to how > to approach alternating turns when writing this code?
One way (not tested): thisplayer = Player() otherplayer = Player() while not_won: thisplayer.take_turn() thisplayer, otherplayer = otherplayer, thisplayer Mel. -- http://mail.python.org/mailman/listinfo/python-list