Python Glossary


This is a list of all the features explained in the Python Tutorial.


Feature Description
Indentation refers to the spaces at the beginning of a code line
Comments are code lines that will not be executed
How to insert comments on multiple lines
Variables are containers for storing data values
How to name your variables
How to assign values to multiple variables
Use the print statement to output variables
How to combine strings
Global variables are variables that belongs to the global scope
Python has a set of built-in data types
How to get the data type of an object
How to set the data type of an object
There are three numeric types in Python
The integer number type
The floating number type
The complex number type
How to convert from one number type to another
How to create a random number
How to specify a certain data type for a variable
How to create string literals
How to assign a string value to a variable
How to create a multiline string
Strings in Python are arrays of bytes representing Unicode characters
How to slice a string
How to use negative indexing when accessing a string
How to get the length of a string
How to check if a string contains a specified phrase
How to combine two strings
How to use escape characters
True or False
Evaluate a value or statement and return either True or False
Functions that return a Boolean value
Use operator to perform operations in Python
Arithmetic operator are used to perform common mathematical operations
Assignment operators are use to assign values to variables
Comparison operators are used to compare two values
Logical operators are used to combine conditional statements
Identity operators are used to see if two objects are in fact the same object
Membership operators are used to test is a sequence is present in an object
Bitwise operators are used to compare (binary) numbers
A list is an ordered, and changeable, collection
How to access items in a list
How to change the value of a list item
How to loop through the items in a list
How use a list comprehensive
How to check if a specified item is present in a list
How to determine the length of a list
How to add items to a list
How to remove list items
How to copy a list
How to join two lists
A tuple is an ordered, and unchangeable, collection
How to access items in a tuple
How to change the value of a tuple item
How to loop through the items in a tuple
How to check if a specified item is present in a tuple
How to determine the length of a tuple
How to create a tuple with only one item
How to remove tuple items
How to join two tuples
A set is an unordered, and unchangeable, collection
How to access items in a set
How to add items to a set
How to loop through the items in a set
How to check if a item exists
How to determine the length of a set
How to remove set items
How to join two sets
A dictionary is an unordered, and changeable, collection
How to access items in a dictionary
How to change the value of a dictionary item
How to loop through the items in a tuple
How to check if a specified item is present in a dictionary
How to determine the length of a dictionary
How to add an item to a dictionary
How to remove dictionary items
How to copy a dictionary
A dictionary within a dictionary
How to write an if statement
If statements in Python relies on indentation (whitespace at the beginning of a line)
elif is the same as "else if" in other programming languages
How to write an if...else statement
How to write an if statement in one line
How to write an if...else statement in one line
Use the and keyword to combine if statements
Use the or keyword to combine if statements
Use the not keyword to reverse the condition
How to write an if statement inside an if statement
Use the pass keyword inside empty if statements
How to write a while loop
How to break a while loop
How to stop the current iteration and continue wit the next
How to use an else statement in a while loop
How to write a for loop
How to loop through a string
How to break a for loop
How to stop the current iteration and continue wit the next
How to loop through a range of values
How to use an else statement in a for loop
How to write a loop inside a loop
Use the pass keyword inside empty for loops
How to create a function in Python
How to call a function in Python
How to use arguments in a function
To deal with an unknown number of arguments in a function, use the * symbol before the parameter name
How to use keyword arguments in a function
To deal with an unknown number of keyword arguments in a function, use the * symbol before the parameter name
How to use a default parameter value
How to pass a list as an argument
How to return a value from a function
Use the pass statement in empty functions
Functions that can call itself is called recursive functions
How to create anonymous functions in Python
Learn when to use a lambda function or not
Lists can be used as Arrays
Arrays are variables that can hold more than one value
How to access array items
How to get the length of an array
How to loop through array elements
How to add elements from an array
How to remove elements from an array
Python has a set of Array/Lists methods
A class is like an object constructor
How to create a class
The __init__() function is executed when the class is initiated
Methods in objects are functions that belongs to the object
The self parameter refers to the current instance of the class
How to modify properties of an object
How to modify properties of an object
How to delete an object
Use the pass statement in empty classes
How to create a parent class
How to create a child class
How to create the __init__() function
The super() function make the child class inherit the parent class
How to add a property to a class
How to add a method to a class
An iterator is an object that contains a countable number of values
What is the difference between an iterator and an iterable
How to loop through the elements of an iterator
How to create an iterator
How to stop an iterator
When does a variable belong to the global scope?
The global keyword makes the variable global
How to create a module
How to use variables in a module
How to rename a module
How to import built-in modules
List all variable names and function names in a module
How to import only parts from a module
How to work with dates in Python
How to output a date
How to create a date object
How to format a date object into a readable string
The datetime module has a set of legal format codes
How to work with JSON in Python
How to parse JSON code in Python
How to convert a Python object in to JSON
How to format JSON output with indentations and line breaks
How to sort JSON
How to import the regex module
The re module has a set of functions
Metacharacters are characters with a special meaning
A backslash followed by a a character has a special meaning
A set is a set of characters inside a pair of square brackets with a special meaning
The Match Object is an object containing information about the search and the result
How to install PIP
How to download and install a package with PIP
How to remove a package with PIP
How to handle errors in Python
How to handle more than one exception
How to use the else keyword in a try statement
How to use the finally keyword in a try statement
How to raise an exception in Python



Login
ADS CODE