Thanks for everyone's replies. I'll take a closer look at your suggestion bvdet and try it out.
I was only using 'list' as an example. Gedit does a good job of highlighting reserved words to keep me making too many newbie errors like that.
Once again, thanks for all your time.
User Profile
Collapse
-
Thanks for the reply.
I can use 'and' sometimes. However sometimes there are so many if's that they'd go off the end of the line if I used 'and' statements. That seems even less readable.Leave a comment:
-
lots of nested if statements.
I'm writing a program which contains an awful lot of nested if statements. I don't know how efficient this is but it definetely makes the code less readable. Does anyone have any advice on how I can improve the following kind of code?
Apparently other languages have a switch statement which is useful here...Python seems to lack this functionality.
My Python is self-taught so I'd appreciate any outside input.
...
No activity results to display
Show More
Leave a comment: