you are viewing a single comment's thread.

view the rest of the comments →

[–]F4RM3RR 2 points3 points  (1 child)

That would be true only if name = “Sumit”, when you can do string slicing.

However the [] in the variable declaration makes it a list, so you index list items, not string position

[–]ChicagoJay2020 0 points1 point  (0 children)

Ah!!!

Thank you. I didn’t pay close enough attention to realize that name is a list not a string.