Bugsy
Explains
3 hearts left

Strings

New idea

Why is 5 + 5 sometimes 55?

You type 5 into an app, it adds 5, and the screen says 55. The app is not bad at maths. It treated your 5 as text, and that changes everything.

Text in code is called a string, and it goes in quotes: name = "Bugsy". A string is a sequence of characters in order, a bit like a list of letters. Spaces and punctuation are characters too.

So what you learned about lists works here: name[0] is "B", the first character, and len(name) counts the characters, which is 5.