🧩String Concatenation
Also known as Concatenation, Joining Strings, Concat
Joining strings end to end to make one longer string.
Think of it like
It is like joining train cars. Each car hooks onto the end of the one before.
Example
A shop app joins "Order " and the order number to show "Order 1042" on the receipt.
Why it matters
Almost every app builds text for people to read. Messages, names and file paths are often joined from parts.
Definition
Example code
python
name = "Emma"
print("Hello, " + name)
# Hello, EmmaCommon mistake
Key takeaways
- 1End to end. Parts are joined in order.
- 2Exact join. No spaces are added for you.
- 3Text only. Numbers may need converting first.