Signed up recently but had issues with the confirmation email?

Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.

Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.

Revision notesQuestionsFor schools
Revise Computing
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Supplementary programming practice/String Manipulation

String length

301.11 String Manipulation

Practise exam questions

String Manipulation — Note 1 of 4

Measure size of string.

What you need to know

len() returns the number of characters in a string, including spaces and punctuation. It is commonly used for validation and loop control.

What to know

  • len("hello") → 5
  • Spaces count: len("hi there") → 8
  • Empty string: len("") → 0
  • Useful for checking minimum/maximum lengths

Code examples

String length
python
name = input("Username: ")
if len(name) < 3:
    print("Too short — at least 3 characters")
else:
    print("Welcome, " + name)
← Previous topicLoop bugs301.10 IterationNext note →Substring slicing301.11 String Manipulation

Back to String Manipulation

Specification notes for programming are in Paper 2.

String Manipulation

Note 1 of 4

  1. 1String length
  2. 2Substring slicing
  3. 3Case conversion
  4. 4String validation
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Worried about something?Question Bank UpdatesPrivacy noticeTermsContact

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