Python Glossary Flashcards
Absolute file path
The full path to a file, starting from the root directory.
Aliasing
When two or more variables point to the same object in memory.
Argument
A value passed to a function when it is called.
Arithmetic operator
Operators such as +, -, *, /, % used for math operations.
Assert statement
Used for debugging; throws an AssertionError if the condition is false.
Assignment
The process of assigning a value to a variable using =.
Attribute
A variable bound to an instance or class (e.g., obj.attr).
Base case
The simplest case in a recursive function that ends the recursion.
Binary
A base-2 numeral system that computers use internally.
Binary search
An efficient search algorithm for sorted lists.
Bitwise operator
Operators that perform bit-level operations like &, |, ^, ~, <<, >>.
Black-box access
Using functions or methods without knowing internal details.
Block
A group of statements that are indented together.
Boolean
A data type with only two values: True and False.
Break
A statement that exits a loop immediately.
Bug
An error in a program that produces incorrect results.
CamelCase naming
Style where each new word starts with a capital letter (e.g., myVariableName).
Caesar shift
A simple encryption technique involving letter shifting.
Class
A blueprint for creating objects (instances).
Comment
Text in code that is ignored by the interpreter, used for documentation.
Commit
A Git operation that saves changes to the local repository.
Comparison operator
Operators like ==, !=, <, >, <=, >=.
Compiler
A tool that translates source code to machine code (less common in Python).
Comprehension
A compact way to create collections, e.g., list comprehensions.
Concatenation
Joining two strings using +.
Conditional
Code that executes based on a boolean expression.
Constructor
Special method used to initialize objects (__init__).
Continue
Skips the rest of the current loop iteration and starts the next one.
Control flow
The order in which code is executed.
Cryptography
The art of securing information through code.
Data structure
A way to store and organize data (e.g., lists, sets, dictionaries).
Data type
Classification of data (e.g., int, str, list).
Dead code
Code that can never be executed.
Debugging
The process of finding and fixing bugs.
Decorator
A function that modifies another function’s behavior (e.g., @staticmethod).
Default argument
A parameter value that’s used if none is provided by the caller.
Destructive function
A function that changes its input.
Dictionary
A data structure with key-value pairs.
Docstring
A documentation string explaining the purpose of a function/class/module.
Elif
A Python keyword for multiple if-else conditions.
Else
The fallback condition after if and elif.
Exception
An error that can be caught and handled in code.
Expression
A combination of variables and operators that returns a value.
External library
A module/package not built into Python and must be installed.
Field
An attribute of a class or object.
File
A resource for storing data.
Filter()
A built-in function that filters items in an iterable based on a function.
Float
A number with a decimal point.
Flowchart
A visual diagram showing program logic.
Folder
A container for organizing files.
For loop
Iterates over items in a sequence.
Function
A reusable block of code.
Generator
A function that returns an iterator and uses yield instead of return.
Git
Version control system.
Github
A platform for hosting and collaborating on Git repositories.
Global variable
A variable declared outside of functions and accessible throughout the module.
Hash function
Converts data into a fixed-size hash value.
Hash table
A data structure (like a dictionary) for fast key-based access.
Helper function
A small function that helps perform a specific task.
Identifier
The name given to variables, functions, etc.
If statement
Executes a block of code if the condition is true.
Immutable
Cannot be changed after creation (e.g., strings, tuples).
Import
Keyword used to bring in modules or libraries.
Incremental development
Building up a program step-by-step.
Index
The position of an element in a sequence.
Indentation
Whitespace used to define blocks of code.
Input
Built-in function to accept user input.
Instance
A specific object created from a class.
Integer
Whole number (positive or negative).
Interpreter
Runs code line-by-line.
Iteration
A single loop cycle.
Lambda
An anonymous (unnamed) function.
Library
A collection of modules or functions.
Linear search
A basic search algorithm that checks each element.
List
A mutable, ordered sequence of items.
Linter
Tool that checks code for errors or style issues.
Local variable
A variable defined inside a function and only accessible there.
Loop
A control structure that repeats code.
Magic methods
Special methods with double underscores (e.g., __str__, __len__).
Method
A function that belongs to an object.
Module
A file containing Python definitions and statements.
Mutable
Can be changed after creation.
Nested loop
A loop inside another loop.
None
A special value representing “nothing” or “no value.”
Object
An instance of a class.
Object-Oriented Programming (OOP)
Programming paradigm based on classes and objects.
Operator
Symbol that performs an operation (e.g., +, -, *, /).
Parameter
A variable in a function definition.
Pass
A null operation; does nothing.
Pandas
A data analysis library.
Pop()
Removes and returns an item from a list or dictionary.
Print
A function to display output.
Profiler
Tool to measure performance of code.
Property
A method that behaves like an attribute using @property.
Pseudocode
Informal code-like steps describing an algorithm.
Push/Pull
Git commands to send/fetch changes.
Raise
Keyword used to throw an exception.
Range()
Built-in function to generate a sequence of numbers.
Recursion
When a function calls itself.
Recursive case
Non-base case in recursion that requires further calls.
Relative file path
File path relative to the current directory.
Return
Exits a function and optionally returns a value.
Scope
Region of code where a variable is accessible.
Set
An unordered collection of unique items.
Short-circuit evaluation
Stops evaluating logical expressions as soon as result is known.
Side effect
A function that changes state outside its scope.
Slicing
Extracting parts of a sequence.
Stack
Internal structure tracking function calls.
Statement
A line of code that performs an action.
String
A sequence of characters.
Style
Code formatting and readability conventions.
Syntax
Rules that define the structure of Python code.
SyntaxError
An error raised for invalid code syntax.
Test-driven development (TDD)
Writing tests before writing code.
Top-down design
Designing a program by breaking it into smaller parts.
Traceback
Error message showing where an exception occurred.
Try-except
Handles exceptions without crashing the program.
Tuple
An immutable sequence of items.
TypeError
Raised when an operation is applied to an inappropriate type.
Underscore naming
Also known as snake_case; uses underscores to separate words.
Unit test
Test of individual functions or pieces of code.
Variable
A named reference to data stored in memory.
Version control
System for managing code changes over time.
While loop
Repeats code as long as the condition is true.
Wrapper function
A function that calls another with additional setup.
Yield
Pauses a generator function and returns a value.