You are viewing a single comment's thread. Return to all comments →
Stupid question, but what is the difference between these two?
current = d.popleft() if d[0] >= d[-1] else d.pop()
if d[0] >= d[-1]: current = d.popleft() else: d.pop()
your top one works - mine didn't.
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Game
You are viewing a single comment's thread. Return to all comments →
Stupid question, but what is the difference between these two?
current = d.popleft() if d[0] >= d[-1] else d.pop()
if d[0] >= d[-1]: current = d.popleft() else: d.pop()
your top one works - mine didn't.