Feb-26-2021, 05:53 AM
spam = ['a', 'e', 'i', 'o', 'i', 'u'] for idx, char in enumerate(spam): print(f'{idx} --> {char}')
Output:0 --> a
1 --> e
2 --> i
3 --> o
4 --> i
5 --> u
Now the question is do you really need the indexes.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs