← the wiki

String

Text inside a program: a chain of characters between quotes, like "hello".

A string is how programs hold text: a chain ("string") of characters between quotes — "hello", "مرحبا", even "123". The quotes matter: 123 is a number you can do math with, "123" is three characters standing together.

Strings can be glued ("py" + "thon"), measured (len("frog") is 4), sliced, searched, and transformed. A huge share of real programming — websites, chats, files — is string work.

The best way to make it stick: watch it run. Start an interactive lesson →