Strings
Strings can use single or double quotes. f-strings put values inside text: f"Hello {name}". Handy methods include upper(), lower(), strip(), replace() and split().
Example
name = "ada"
print(name.upper())
print(f"Hello, {name.title()}!")
print(len(name))
print("a,b,c".split(","))Result
ADA Hello, Ada! 3 ['a', 'b', 'c']
Exercise
Make the text uppercase.
print("hello".())
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.