Revise Computing
Revision notesQuestionsFor schools
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Supplementary programming practice/Concatenation and Basic Strings

String concatenation

301.5 Concatenation and Basic Strings

Practise exam questions

Concatenation and Basic Strings — Note 1 of 3

Join multiple strings.

What you need to know

Concatenation means joining strings together using the + operator. Both sides must be str type — if one is a number, you must cast it first.

What to know

  • + joins two strings: "Hello" + " World" → "Hello World"
  • Both sides must be str type
  • No automatic space — add it yourself
  • Use str() to convert numbers before joining

Code examples

String concatenation
python
first = "Hello"
second = "World"
print(first + " " + second)  # Hello World
← Previous topicFix type errors301.4 Data Types and CastingNext note →Strings + Numbers301.5 Concatenation and Basic Strings

Back to Concatenation and Basic Strings

Specification notes for programming are in Paper 2.

Concatenation and Basic Strings

Note 1 of 3

  1. 1String concatenation
  2. 2Strings + Numbers
  3. 3Readable output
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Privacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).