If i would do it like that, it will return None if the first row is not with the given vnum :o
"You can do it too, here is just a example."
I not say to delete the loop, i just showed a better option to return on situation because you did return color, return None etc, isn't compatible on this case my example from quoute of course with your loop
I say you can do it simple like this: (I'm speaking just about returning mode
Zitat von SaniiI want to know if theres a better way to check if it is existing in the array.
I can give you a better option for a dict elements and you can play with this more funny
Zitat von SaniiAnd maybe i could do: if itemVnum in range(fromVnum, toVnum+1): but i dont like this +1 xD
I hope you get my points, i just speaking about more good practices, on progamming never exist a final version of code, everytime we can extended it.
Good luck.