Login Register






VERY first python program filter_list
Author
Message
RE: VERY first python program #6
(11-27-2012, 05:27 PM)Deque Wrote:
(11-27-2012, 05:18 PM)LightX Wrote: The code did work, but so what you are saying is that I should use elif instead of if's the whole time?

No, I didn't say that.
I tried to explain that your current checks (if-statements) are inefficient, because you check unnecessarily.
Get to know how if, else and elif work together in order to achieve a better code.
Try to understand by looking at my explanations and pseudocode why it is better.

Maybe I can make up some examples to explain it better. I often feel that my english is not good enough.

Okay, thank you for the tip! I will look into it! Smile And honestly, i thought you were from the US...i couldnt tell that you werent good with your english...so good job! Smile

Reply





Messages In This Thread
VERY first python program - by LightX - 11-26-2012, 07:59 AM