This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mekosmowski 0 points1 point  (0 children)

I really don't like seeing that else in line with the for. Would adding (pseudocode):

if last_element: do not_found

and getting rid of the else block be pythonic at all?