1/13
Exam practice
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Program
A set of instructions that tells the computer what to do.
What do Python extension files end with?
.py extension
String
A string is a sequence of characters used to handle textual data.
Immutable
Immutable data types are data types that cannot be changed.
Immutable Data Types List
String, tuple, ints, floats, complex, bool
Mutable Data Types List
Lists, dictionaries, and sets.
Functions
Functions are blocks of reusable code when called.
DeMorgan’s Law Formula
not (a and b) == not a or not bnot (a or b) == not a and not b
Append Method Syntax Description
my_list.append(item)
my_list = List
item: Required; otherwise, you get an error!
What does .append() do in Python?
The .append() method is a built-in function that is used to add a single item to the very end of the list.
What does .extend() do in Python?
The list method .extend() is a built-in function that adds all the elements of an iterable such as a (string, set, tuple, or list) to the end of the current list.
It changes the original list in place and returns None.