How does one break from a double for loop, or a loop of two variables? for example:
for x in range(10): for y in range(10): if 2^x*3^y==12: break (x,y) I want this to return (2,1) rather than (9,1). This is just a simplified example, but that is the approximate situation. Any ideas? --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---