Why this happening ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this happening ?

CHECKOUT THIS CODE AND HELP ME PLEASE https://code.sololearn.com/cSgR22QC96CE/?ref=app

6th Feb 2022, 5:24 AM
IDIOT KID
IDIOT KID - avatar
1 Answer
+ 3
IDIOT KID You are iterating text so until l is not equal to v it is printing text so it is printing 4 time as 'v' exist at 4th index as index start from 0 When you print 'l' it will print each character of that text for l in g: here 'l' is a each character of 'g' Remember space is also a character.
6th Feb 2022, 5:36 AM
A͢J
A͢J - avatar