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 / 3Join 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.

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…