Follow

Finished code (Python) 

@masterofthetiger@theres.life @Absinthe and style-wise, i is usually used as the index when looping over numbers, so it's confusing that it's storing your values here. Also, since this is something that's so common to do, python provides a way of looping over both the index and the value at the same time: enumerate

for i, elem in enumerate(input):
stuff

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.