Advertisement
Guest User

swapper.py

a guest
Jul 17th, 2010
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1.  
  2. #! /usr/bin/python
  3. # swapper.py
  4. #
  5.  
  6. import sys
  7.  
  8. print "A"
  9. sys.stdout.flush()
  10.  
  11. chooseA = True
  12.  
  13. while(True):
  14.     line = sys.stdin.readline()
  15.    
  16.     chooseA = not chooseA
  17.     print "A" if chooseA else "B"
  18.     sys.stdout.flush()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement