Throughing me an indentation error @4th line | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Throughing me an indentation error @4th line

#counting the repetitive value data='james pitani' count=0 for rep in data: if rep=='i': count = count+1 print count

21st Apr 2018, 5:56 AM
Kesava N
Kesava N - avatar
2 Answers
+ 5
The number of spaces you use for indentation matters. data='james pitani' count=0 for rep in data: if rep=='i': count = count+1 print(count)
21st Apr 2018, 6:23 AM
Hatsy Rei
Hatsy Rei - avatar
0
yes I corrected
21st Apr 2018, 6:23 AM
Kesava N
Kesava N - avatar