3.03
Completed
String Concatenation String Concatenation

Learn how to join strings together in Python, handle spaces, and include numbers in text safely.

String Concatenation

Sounds useful?

Jump into the interactive version.

No setup. No account. Just Python.

Interactive Python lesson

String Concatenation in Python

This Block teaches one of the most common text-building basics in Python: joining strings together with +. You will start with tiny examples like combining a first name and last name, then move into building full messages, sentence pieces, profile text, and receipt-style strings.

You will also learn the sneaky parts: Python does not add spaces for you, quoted variable names are just text, and joining strings with numbers requires converting the number first with str().

What you will learn:

  • Join strings together using +
  • Add spaces, punctuation, and separators intentionally
  • Understand why "2" + "3" becomes "23", not 5
  • Use str() to include numbers inside text
  • Store a combined string in a variable instead of only printing pieces
  • Avoid common beginner mistakes like missing spaces or quoting variable names

By the end, you will be able to build clear text messages from smaller values and understand exactly what Python is doing when it glues strings together.

> Start now 76 cards · about 8 min

Ready to practice this in the browser?

> Play now