![]() |
Branching&loops problem
I have some if and elif statements that I use multiple times so I put them in a def. Now I have a while loop whic start with the defdfunction() and then has elif statements (because the if statement is in the defdfunction) but python says that the firs elif in the while loop is an error.
Here's an example: http://rafb.net/paste/results/ZXY1lI53.html |
elif and else statements are subsections of an if block. You can't move the if statement away from the elif blocks.
You probably want something like: :
if something: |
| All times are GMT -5. The time now is 8:03 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC