0
Should I think of indexing or offset (that starts from 0 rather than 1 in python) not as the number of the character itself, but
I read somewhere that this offsetting is because of the spaces not number of characters or due to some kind of tradition in programming languages.... e.g. my_string = 'fugu-sashi' my_string[0] output is 'f' Here you can see that.. between start & the character-'f' we have zero space, so it is indexed as '0' & so on..
1 Resposta
+ 7
I wouldn't overthink it too much :)
Indexes in Python start from 0, that's it. It kind of grows on you after a while... ;)