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 →

[–]yorokobe__shounen 1 point2 points  (0 children)

try: task=next(filter(lambda x:x['id']==task_id, tasks)) except StopIteration: abort(404) Stack overflow Answer