Guided pathThis is part of Understand Transformers & BERTBack to the path

Text (strings)

P40.text-and-numbers.02 · Audience: guest, language-pro, it-ml · Prerequisites: Numbers and arithmetic

Real LLM grading for this pageLLM grading (this page):

Text is the material you work with all day. Before any code, imagine tidying a name that arrived split across two boxes — join the parts, capitalise a heading, count the letters. This module gives those everyday tidying moves their Python names, one at a time.

Step 1 / 3 — Join text with +
ⓘ Concept: A string is text inside quotes
A string is simply characters inside quotes, like "ada". You join two strings with + — the same sign as adding, but for text: first + " " + last glues a first and last name into "ada lovelace", exactly as you would write a letterhead. The text itself never changes; + hands you a new copy.

Why it matters — Text is a language professional's raw material. Seeing that code handles words with a few named, ordinary moves makes the notebook feel like a tool for your work.

Ask the mentor about this module

Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.

Images, PDF or text. Kept on this device only.
Keeping your files on this device

Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.

Ctrl/Cmd + Enter to send

🎓 Practice ladder

1 graded rung · ~5 min

Your turn: a name came in split in two. Join the parts with a space, make a capitalised headline, and count the characters — the tidying you just stepped through — then press Run.

Explorer rung — tidy a messy line

Loading exercise…

My notes on this module

Loading your notes...

Text (strings) — TransformerLab