Skip to content

Types: numbers, text and more

Read · 1 of 4

Every value has a type

int: whole numbers like 42. float: decimals like 49.5. str: text in quotes. bool: True or False.

int("7") turns text into a number, and str(7) turns a number into text. An f-string mixes them easily: f"I am {age}" puts age's value inside the text.