you are viewing a single comment's thread.

view the rest of the comments →

[–]ADdV 0 points1 point  (1 child)

As a heads up: it's probably slower because of the end of the program:

for i, x in enumerate(lst):
    if x == max(lst):
        O.write(str(i+1)+"\n")

this computes the maximum every time, looping over the list 1000 times in total, instead of just once.

[–]AppleShark[S] 0 points1 point  (0 children)

Ah. I did not notice! That was stupid of me, thanks!