You are viewing a single comment's thread. Return to all comments →
a nice thing about python is that you can just do: while arr: ...
an empty array will evaluate to False in a conditional statement.
while arr: print(len(arr)) arr = [x for x in arr if x != min(arr)]
Seems like cookies are disabled on this browser, please enable them to open this website
Cut the sticks
You are viewing a single comment's thread. Return to all comments →
a nice thing about python is that you can just do: while arr: ...
an empty array will evaluate to False in a conditional statement.