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
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.