Home / Python / Basics

Strings

Strings are text. Slice them with [start:end], join them with +, and format them with f-strings. You will often read them from files.

name = "Asha"
print(name[0])
print(name.upper())
print(f"Hello, {name}!")

Test yourself on this