<div class="gmail_quote">On Tue, Feb 1, 2011 at 3:24 PM, ANKUR AGGARWAL <span dir="ltr"><<a href="mailto:coolankur2006@gmail.com">coolankur2006@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey<div>I am developing a zero-cross game from the basics of the tkinter. I want something like this-</div><div><br></div><div>We have 4 buttons like 1 2 3 4</div><div>i want the output should change on the alternate button hit. Like inorder i hit-</div>
<div>Button return </div><div>1 1</div><div>3 0</div><div>2 1</div><div>4 0</div><div><br></div><div>Basically i want to change the output of the button alternatively. like for example take this scenario-</div>
<div><br></div><div>Button return</div><div>2 1</div><div>4 0</div><div>1 1</div><div>3 0</div><div><br></div><div>It depends on the user which button it hits first but i want the output to be different for alternate button pick.</div>
<div>i tried to think upon this very much but unable to finally come up with any idea. Cn anyone suggest me a way out.</div><div>Thanks in Advance.</div><div>Ankur Aggarwal </div></blockquote><div><br></div><div>def one_or_zero():</div>
<div> x = 0</div><div> while True:</div><div> x = not x</div><div> yield x</div><div><br></div><div>Something like that? </div></div>