1/36
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Equality
The == operator checks whether two objects have equal values.
Object Identity
The is operator checks whether two names refer to the same object.
Mutable
An object that can be changed after it is created.
Immutable
An object that cannot be changed after it is created.
NoneType
The type of None, representing the absence of a value.
Type Casting
Converting an object/value to another type, such as str(), int(), float(), bool(), or list().
str()
Converts an object into its string representation.
list()
Converts an iterable (like a string or tuple) into a list.
Control Flow
Determines which statements execute and when based on certain conditions.
If Statement
A statement that executes a block of code if a specified condition is true.
For Loop
A loop that iterates over items in an iterable, executing a block of code for each item.
While Loop
A loop that continues to execute a block of code as long as a specified condition is true.
Break
A statement that immediately exits the loop.
Continue
A statement that skips the current iteration and moves to the next iteration of the loop.
Pass
A no-operation statement that does nothing; used as a placeholder.
lambda
An anonymous function defined with the lambda keyword, typically used for short, throwaway functions.
map()
Applies a function to every element in an iterable and returns a map object.
Datetime Module
A built-in module for working with dates and times in Python.
strftime()
Converts a datetime object to a formatted string.
strptime()
Parses a string into a datetime object.
id()
Returns the identity of an object, which is unique and constant during its lifetime.
Boolean Logic
A branch of algebra involving true or false values; it includes operations like and, or, not.
Short-Circuit Evaluation
The evaluation strategy where the second operand is not evaluated if the first operand determines the result.
list comprehension
A concise way to create lists by applying an expression to each item in an iterable.
Dictionary Access
Accessing values in a dictionary using their corresponding keys.
tuples
An immutable sequence type in Python, often used to group related data.
sets
An unordered collection type in Python that enforces uniqueness of its elements.
zip()
Combines multiple iterables element-by-element into a tuple.
enumerate()
A built-in function that adds a counter to an iterable and returns it as an enumerate object.
reversed()
Returns a reverse iterator for a given sequence.
sorted()
Returns a new sorted list from the elements of any iterable.
Generators
Functions that yield a sequence of values instead of returning a single value, using yield instead of return.
iterator protocol
A protocol that implements methods iter() and next() to allow objects to be iterable.
timedelta
A duration representing a difference between two dates or times.
list()
Creates a new list object from an iterable.
dict()
Creates a new dictionary object.
Python Arrays vs. NumPy Arrays
NumPy arrays use contiguous memory storage for performance, while Python lists use scattered memory.