Python Glossary is a list of vocabulary that you will likely encounter during your Python learning journey. We suggest you to get familiar with the terms here and refer back to it time to time as your Python skill-set grows and you come across with new Python terminology.

Python Glossary

Arguments are the values that are passed to functions and methods. Sometimes used interchangeably with parameter.

Python objects have attributes. When you try to take a sneak peak in an object’s attributes and methods, you can see items with double under scores: __doc__, __init__ etc. These are objects’ attributes and usually carry information about object’s core functions and features.

A boolean expression falls under a sub branch of algebra: boolean logic. Boolean variables take a truth value which can either be True or False.

A class gathers different variables and functions under the same roof which helps generate or multiply objects very conveniently and helps us keep them together. You can think of class as a template or layout plan for the functions, variables and data we’d like to manipulate.

A code block is a structure of code that’s generally separated from other parts of the code. It is usually separated by semicolon (:), comma (,), brackets ([]), etc. depending on the syntax and in Python codes inside the code blocks usually require indentation.

Python user functions, classes, conditional statements are good examples to code blocks.

Comments are messages that are intended to be shown to the programmer and anyone who reads the code but it is not compiled by the software or code is not executed. It has no function other than appearing and giving the intended message(s).

In Python comment line is achieved by a sharp sign: (#)

Compiler is a software program that does the compiling (translating code in a way that the computer’s electronic hardware understands it and executes it) process.

It can refer to the sub-section’s in a software program as well. Spyder software is a good example where you can write, debug, edit as well as compile Python code thanks to its compiling capabilities.

Compiling is the process of translating the code from a high-level programming language (such as Python) to a lower level language so that the computer can understand the code and execute it in a meaningful way for its hardware such as the processor, memory, mainboard etc.

Conditional statements allow us to control the flow of execution by creating a structure which creates rules for the execution.

Statement runs when the rules are met and another statement can run when rules are not met.

Conditional statements are also referred to as conditional expressions.

In Python conditional statements are structured with if, elif and else keywords and a specific syntax.

Console is the area or window where programmer gets an output for its code. It’s usually text only such as most coding terminals but it can be more sophisticated as well and include some degree of graphical interface.

Constructors are simply special functions inside the class definitions and they are called whenever that class is created.

In Python default constructor is created with a typical syntax similar to:

def __init__(self):

And other constructors with parameters can be created with something like:

def anyfunction(self, parameters, a, b etc.):

Control flow denotes the order in which a program’s functions, statements and instructions are executed.

Debugging is a process in programming that refers to finding and solving bugs and conflicts that can cause issues while running the program.

A dictionary in Python is a sequence of key-value pairs without any specific order. It is also referred to as dict data type.

Documentation in programming can come in many ways and formats. It usually includes information regarding the program, how to use it, what to keep in mind, versions, creators, links etc.

It can be included in the code or it can come separately or be published on a website as well.

One example is API documentations which are widely used to understand the APIs format and how to access it.

An expression is a vague term in programming that can refer to any meaningful combination of variables, data, functions that creates a value 

Float in Python represents numbers with fractions (floating points) which can not be represented by an integer since they don’t have decimal points.

Functions in Python are objects that can be builtin (such as sorted, print, len, int, list, map, zip, filter etc.) or user defined (with def…(): statement).

Functions are built with specific purposes and they are a great way to generate reusable, readable, structured codes.

A global variable is a variable declared outside a function.

IDE stands for integrated development environment which are software that provides coding environments. They usually have rich features such as advanced debugging, layout customization and code completion that simple notepad editors don’t have.

Python relies on indentation or indenting to know which code block is subordinate and proper indentation is crucial to the syntax and semantics of the program. It is used in a function definition, conditional statement, class construction and loop.

In some other programming languages such as: C or C++however, indentation is a visual feature only and it’s used for readability and its lack won’t affect the output.

In Python, index refers to the position of an item in an ordered sequence such as: lists, tuples and strings.

Inheritence is a useful concept related to classes in Python. It means you can inherit all or partial properties of a parent class and then also change them if you’d like. This is one of the fundamental concepts of object-oriented programming.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

An integer is a number without any fractional component. Positive natural numbers, negative natural numbers and zero are integers.

In Python integer is also stands for int type which obeys the definition of integer numbers.

In Python iterables are objects whose members can be returned one at a time thus making them iterable by an iteration structure (such as: for loops or while loops).

Common Python iterables are: dictionaries, lists, ranges, tuples and strings.

Iteration is the process of repetition based on given specifications until the iterable is over or the condition to end the iteration is met.

In Python dictionary data type is consisted of key-value pairs. Keys are unique variables that hold values components of the key-value pairs in dictionaries and keys must be immutable data types such as: strings, integers, floats or tuples.

Key-value pairs are the ingredients of a Python dictionary. Every key is unique and it holds some data (key’s value) and this pair is called as key-value pair.

This is similar to a human language dictionary where you look up for a word (key) and you get its meaning (value):

lioness(key) noun:
li·​on·​ess | \ ˈlī-ə-nəs \
Definition of lioness:
a female lion (value)

 

Keywords in Python are reserved words that can not be used as ordinary identifiers such as variables and function names.

Here is a list of Python keywords:

and, as, assert, break, class, continue, def, del, elif, else, except, exec, finally, for, from, global, if, import, in, is, lambda, not, or, pass, print, raise, return, try, while, with, yield

Library is a generic term that can have similar meanings with a module. When a module (single file), or a package (multiple files and/or packages) are publicly published it will be referred to as library more often than module or package.

Libraries enable us to import them in Python and conveniently use their functions without going through the process of writing them. PIL (image processing library), CV2 (face recognition library) and Tesseract (optical recognition library) are good examples to libraries in Python.

A local variable is a variable declared inside a function and its only available to that function.

In Python, there are 3 logical operators:

and,
or,
not.

They create logical operators which return boolean results as either: True or False.

Logical operators are extremely useful in programming and they are often a common ingredient in coding tasks.

Toggle Content

Simply, a Python file denotes a Python module and it can be imported inside Python.

More complex data type such as lists, tuples and dictionaries can have other lists, tuples or dictionaries inside them and there can be more lists, tuples and dictionaries inside them. When this happens inner data is not available on the surface level and hence the term nested.

In Python object can mean many things and its has a very wide area of coverage. Generally, objects are collections of data and functions and the concept of object is fundamental to how Python functions.

Object-oriented programming, also called (OOP) denotes programming style that is oriented around objects which hold data. It lets us use and produce reusable codes with high efficiency. This is very different than procedural-oriented programming which focuses on procedures and well structured steps while writing code.

Operators are special symbols used for specific operations in Python such as logical operations or arithmetic operations.

Parameters are passed to functions during the declaration of a function. It can be confused with arguments which usually denotes the values of parameters after they are declared but these two terms are sometimes used interchangeably.

Range is a useful data type in Python that denotes an iterable range. It can be created with a range() function.

Return value is the value a function outputs. It is achieved by using the return statement in a function.

Runtime simply refers to the life cycle of a program while its running.

Runtimes Environment (RTE) however, means the environment in which the program executes.

If syntax is the grammar of a coding language semantic is concerned with meaning.

You can have syntactically valid codes which have semantic problems that keep your code from producing the meaningful results you are aiming for.

Sequence means a set of data. Common sequences in Python are:

Lists,
Dictionaries,
Tuples,
Strings,
Ranges

A statement in Python is an instruction that can be interpreted in Python.

There are different kinds of statements such as an assignment statement, when you make an assignment, and expression assignments such as: arithmetic statements, conditional statements, pass statement, return statement, logical statements, import statement, break and continue statements, try statement, except statement etc.

String is a data type that resembles text. It is consisted of a sequence of characters which can be letters, symbols and numbers. There are three ways to represent strings in Python:

inside double quotes: ” “
inside single quotes: ‘ ‘
inside triple single quotes: ”’ ”’

A very helpful analogy to syntax is its resemblance to grammar in human languages. Just as English language has a grammar that mandates how sentences are structured, programming languages have a syntax that mandates how code can be written in them. Python syntax’ beautifully simplistic and efficient nature is one of the main reasons it has so many fans around the world.

One important point to note is that although human language can be forgiving to grammar errors and messages can still be meaningful and understood. Compilers are usually very un-forgiving in this sense and a semi colon (:) or its lack of it can cause the whole code to throw a syntax error for the compiler. Although this is something that coders quickly get used to get comfortable with, starters can have difficulty with this aspect of coding in the very beginning.

A test case in programming is creating specific codes, inputs, variables, functions, conditionals etc. in order to check if the expected output is achieved.

In Python, Tuples are sequenced data types similar to lists and dictionaries. They can hold a variety of tuples and/or other data types and tuples are also immutable sequences.

Type conversion in Python allows us to convert from one type of data to another (when suitable). An example can be converting an integer in string format: “1” to integer format: 1.

In programming, variables are containers of data values. They take individual names and they can hold a very wide range of different size, shape and type of data. Some names can be reserved in programming languages and you have to be mindful about naming your variables.