Coding Education

5 min read

What Is a String? The Text Data Type

Published: 10.07.2026·Updated: 10.07.2026
Neftalí Cázares

Neftalí Cázares

Senior Coding Instructor

What Is a String? The Text Data Type

A string is a data type that represents text: a sequence of characters —letters, numbers, spaces and symbols— written between quotation marks. Whenever a program stores a name, a message or a word, it stores it as a string. The text always goes inside quotes so the computer knows to treat it as words and not as a math operation: "123" is a string, while 123 is a number you can add.

How a String Works

A string stores its characters in the exact order they are written. Imagine a game where the player picks a name: that text is saved in a string called, for example, player_name. In Scratch, the "ask and wait" block collects what the child types and stores it as text in the variable answer. In Python it looks like this: player_name = "Ana", and then print("Hello, " + player_name + "!") shows Hello, Ana! on screen. Joining two strings like this is called concatenation.

One concrete fact: computers store each character of a string as a number using the Unicode table. That is why the letter "A" is stored internally as the number 65. A string is really an ordered list of codes that the machine translates into the symbols we see.

Por Que Importa para los Ninos

Understanding what a string is helps kids build programs that talk to people: greetings, scores, messages and menus. It is one of the first concepts that appears when making games or chatbots. In Algonova's coding courses kids practise with strings from their very first projects, and can reinforce it with what is a variable.

Want your child to try it? Book a free class and build it live.