Dec-29-2016, 08:37 AM
Hello guys,
Here i need to print the index of the vowels in a string
Here is my code
Here i need to print the index of the vowels in a string
Here is my code
li=['a','e','i','o','u'] word='Rizvi' for i in word: if i in li: print word.index(i)The expected output is:
Output:1
4
what i am getting is:Output:1
1
Thanks in advance