Revise Computingrevisecomputing.co.uk
At a glanceFeaturesStudentsPricingHow it worksFree GCSE notesExam dates
At a glanceFeaturesStudentsPricingHow it worksFree GCSE notesExam dates

Knowledge organisers / String Manipulation

Case conversion

All topicsPractise exam questions
Knowledge organiser

String Manipulation

301.11c

UPPER lower Title.

What you need to know

String methods .upper(), .lower(), and .title() return new strings with changed case. The original string is not modified. Useful for case-insensitive comparisons.

Key points

  • .upper() converts to UPPERCASE
  • .lower() converts to lowercase
  • .title() capitalises first letter of each word
  • Original string is unchanged — methods return a new string
  • Use .lower() for case-insensitive comparison

Code examples

Case conversion
python
name = "alice smith"
print(name.upper())   # ALICE SMITH
print(name.title())   # Alice Smith

answer = input("Yes/No: ")
if answer.lower() == "yes":
    print("Confirmed")