Python Type Casting Explained
Learn what type casting means in Python, how to cast between integers, floats, strings, and collections, and the difference between casting and conversion.
Learn Python programming from scratch
Learn what type casting means in Python, how to cast between integers, floats, strings, and collections, and the difference between casting and conversion.
Learn the critical difference between the is operator for object identity and the double-equals operator for value equality in Python.
Learn how to compare values in Python using comparison operators, chained comparisons, and how different data types behave when compared to each other.
Learn about Python's four main collection types, lists, tuples, sets, and dictionaries, and understand which one to use for any programming task.
Learn what a Python list is, how it stores ordered mutable data, and why lists are the most commonly used collection type in Python programs.
Learn every way to create a Python list and how to access individual items, slices, and nested elements using zero-based indexing.
Learn how to add, remove, and change items in a Python list using append, insert, extend, pop, remove, the del statement, and slice assignment.
Learn to sort Python lists using the sort method and the sorted function, control ascending and descending order, sort by a custom key, and reverse lists.
Learn how to copy Python lists using slicing, the copy method, the list constructor, and the copy module. Understand shallow vs deep copies.
Learn how to create, access, and modify nested lists in Python. Build grids and matrices, and understand how shallow copies affect multi-dimensional data.
Master Python list comprehensions to create, filter, and transform lists in a single line. Learn the syntax, common patterns, and when to use a regular loop instead.
Put your Python collections knowledge into practice. Build a task tracker, a grade calculator, and a shopping cart using lists, dictionaries, sets, and tuples.