String manipulation (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
14 cards from this deck
ShowHide
Practise the cards
14 cards from this deck
What is a string?
What is a string?
A sequence of characters
What does len() do?
What does len() do?
Counts characters in a string
What does find() return if text not found?
What does find() return if text not found?
-1
What does find() return if text is found?
What does find() return if text is found?
Position where it first finds the text
What does upper() do?
What does upper() do?
Converts string to uppercase
What does lower() do?
What does lower() do?
Converts string to lowercase
What does replace() do?
What does replace() do?
Swaps one piece of text for another
What do query functions return?
What do query functions return?
True or False answers
When does isalpha() return True?
When does isalpha() return True?
String contains only alphabetic characters
When does isalnum() return True?
When does isalnum() return True?
String contains only letters and numbers
When does isdigit() return True?
When does isdigit() return True?
String contains only numerical digits
When does isupper() return True?
When does isupper() return True?
All letters in string are uppercase
When does islower() return True?
When does islower() return True?
All letters in string are lowercase
What does len() return for an empty string?
What does len() return for an empty string?
0
