Answer the question
In order to leave comments, you need to log in
Why is the list object not the same as its index?
glasn = ["e", "u", "i", "o", "y", "a"]
def transkrip():
slovo = input("Введите слово: ")
list_slova = list(slovo)
for x in list_slova:
if x in glasn:
len_glasn = glasn.index(x)
s = str(len_glasn) + " - " + x # обьект списка не совпадает с его индексом
print(s)
Answer the question
In order to leave comments, you need to log in
The index is counted from zero:
["e", "u", "i", "o", "y", "a"]
0 1 2 3 4 5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question