Python Join Strings
str + strPractice

Build a full name from parts

+ glues strings together. "Ada" + " " + "Lovelace" becomes one label on a boarding pass.

Picture this: glue text together

+ on strings joins them. Spaces are characters too.

"Hello"first piece
+
" "space
+
"Kodin"second piece
→
Hello Kodinone string

In easy words: What is string concatenation?

String concatenation means joining text pieces into one bigger text using +.

Where this is used

Used for full names, messages, addresses, labels, file paths, and building readable output text.

Real world: airline ticket

System stores first and last separately, then prints Ada Lovelace on the ticket. The space in the middle is its own string " ".

Type first and last name

Ada + " " + Lovelace
Ada Lovelace
3print(first + " " + last)

Tip

  • Without " " you get AdaLovelace — no gap!
  • Numbers use + for math; strings use + for joining.

Example Program

1first = "Ada"
2last = "Lovelace"
3print(first + " " + last)