Types and Conversion
Constructors for the core types: int, float, complex, str, bool, list, tuple, set, dict.
Beginner
This is an overview — pick a sub-topic below.
Sub-topics (3)
int(), float() and complex()
Create numbers from strings or other numbers.
Beginner♥ 0🔖 0💬 0
str() and bool()
Convert any object to text, or to True/False by its truthiness.
Beginner♥ 0🔖 0💬 0
list(), tuple(), set() and dict()
Build collections from any iterable.
Beginner♥ 0🔖 0💬 0
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.