+ 1
Counting as per Programming is Confusing
I have a doubt in Python So if we define a variable and assign some strings value eg: name = 'Hacker' As per Programming The first letter 'H' will carry zero (0) And 'r' will 5 When we use the function len(name) Why it will print 6 instead of 5
2 Respuestas
+ 4
len function start Counting from 1 not from 0
But Indexing will start from 0.
+ 2
Thanks for your answer 😀