+ 3
How can I fix index error in my code ??🤔
4 odpowiedzi
+ 6
Here is a simple example.
You're welcome.
a1 = input('Enter your name')
for i in range(len(a1)):
print("\n"+a1[i]+' '+'comes in your name = '+' '+str(a1.count(a1[i])))
+ 5
The reason it raises index error is because of conditions. It says, input should contain minimum 10 characters to run without any errors.
Try using a for loop to solve this issue.
+ 3
Yeh ...
I have to cover this topic then i will try ...😅 I am learning while loop next for loop then i will try to solve .. this issue...
Thanks for this suggestion....
I have to complete these topics...
+ 2
Yes
This one is easy to understand...
Simba