0

so list string uses a 1 index, not the typical 0 index?

18th Jul 2016, 11:23 PM
David Booker
David Booker - avatar
2 Réponses
+ 3
No. Str objects use the same 0 ordinal access as lists. Each letter in a string will become an acccessable item.
19th Jul 2016, 1:16 AM
jj Fer
jj Fer - avatar
0
List starts from 0 index Fru=["apple","banana"] print (Fru[0] )
19th Jul 2016, 4:00 AM
Rahul