# Python vocabulary: Apprentice level

107 Python terms at the Apprentice level, each with a short definition and a link to its full page.

Updated: November 19, 2026

[Study these as flash cards](https://www.ask-codey.com/decks/python/apprentice)

- [\*\*kwargs](https://www.ask-codey.com/glossary/kwargs): Lets a function accept any number of keyword arguments, collected as a dictionary.
- [\*args](https://www.ask-codey.com/glossary/args): Lets a function accept any number of positional arguments, collected as a tuple.
- [append()](https://www.ask-codey.com/glossary/append): Adds one item to the end of a list.
- [Argument](https://www.ask-codey.com/glossary/argument): The actual value you hand to a function when you call it.
- [AssertionError](https://www.ask-codey.com/glossary/assertionerror): The error Python raises when an assert's condition is False; it carries the assert's message.
- [Bin](https://www.ask-codey.com/glossary/bin-python): One range of values in a histogram, such as $5 to $10; its bar's height is how many values fall in it.
- [break](https://www.ask-codey.com/glossary/break): Stops a loop immediately.
- [Breakpoint](https://www.ask-codey.com/glossary/breakpoint-python): A mark on a line, the red dot in VS Code's margin, that pauses a program under the debugger before that line runs.
- [Causation](https://www.ask-codey.com/glossary/causation): One thing making another happen. Showing it takes more than two things moving together, usually a test that changes one thing at a time.
- [Command-Line Argument](https://www.ask-codey.com/glossary/command-line-argument-python): A word typed after a Python script's name when it's started, which the script reads from sys.argv or with argparse.
- [continue](https://www.ask-codey.com/glossary/continue): Skips to the next pass of the loop.
- [Data Analysis](https://www.ask-codey.com/glossary/data-analysis): Answering questions with numbers from a table of data, such as which store sold the most last month.
- [Debugger](https://www.ask-codey.com/glossary/debugger-python): A tool, such as the one in VS Code's Python extension, that pauses a running program so you can step through it and look at its variables.
- [def](https://www.ask-codey.com/glossary/def): The keyword that starts a function definition: def, the function's name, parentheses and a colon, read "define".
- [Default Parameter Value](https://www.ask-codey.com/glossary/default-parameter-value): A value a parameter uses when the caller leaves that argument out.
- [Dictionary](https://www.ask-codey.com/glossary/dictionary): Stores values under keys so you can look them up by name.
- [Docstring](https://www.ask-codey.com/glossary/docstring): A triple-quoted note under a function line that explains what it does.
- [DPI](https://www.ask-codey.com/glossary/dpi): Dots per inch: how many pixels each inch of a saved picture becomes, so 10 inches at 150 dpi is 1500 pixels wide.
- [Duplicate Row](https://www.ask-codey.com/glossary/duplicate-row): A row that repeats an earlier one, in every column or in the columns that make two rows the same event.
- [enumerate()](https://www.ask-codey.com/glossary/enumerate): Gives each item in a loop along with its position number.
- [Execution Count](https://www.ask-codey.com/glossary/execution-count): The number beside a notebook cell, such as \[4\]: this was the fourth cell run since the kernel started.
- [File Mode](https://www.ask-codey.com/glossary/file-mode): Tells open() what you plan to do: "r" read, "w" write, "a" add to the end.
- [FileNotFoundError](https://www.ask-codey.com/glossary/filenotfounderror): The error Python stops with when it's asked to read a file that isn't there, most often because the name is misspelled or the terminal is in another folder.
- [fit()](https://www.ask-codey.com/glossary/fit): The scikit-learn method that trains a model on examples: model.fit(X, y) learns from the features X and the labels y.
- [for Loop](https://www.ask-codey.com/glossary/for-loop): Repeats code once for each item in a collection.
- [from … import](https://www.ask-codey.com/glossary/from-import): Brings in just the names you want from a module.
- [Function](https://www.ask-codey.com/glossary/function-python): A named block of code, written once with def and run whenever a line calls its name with parentheses.
- [Global Variable](https://www.ask-codey.com/glossary/global-variable): A variable created outside any function, readable anywhere in the file.
- [head()](https://www.ask-codey.com/glossary/head-python): A pandas method that shows a DataFrame's first rows, five unless you ask for another number; tail() shows the last.
- [Histogram](https://www.ask-codey.com/glossary/histogram): A chart of touching bars that counts how many values fall in each range, to show how one column's values are spread.
- [Immutable](https://www.ask-codey.com/glossary/immutable): Can't be changed after it is created, like a string or tuple.
- [import](https://www.ask-codey.com/glossary/import): Brings a module into your file so you can use it.
- [Infinite Loop](https://www.ask-codey.com/glossary/infinite-loop): A loop that never stops because its condition never becomes false.
- [info()](https://www.ask-codey.com/glossary/info): A pandas method that lists every column of a DataFrame with its dtype and how many values are there, which shows the gaps.
- [isna()](https://www.ask-codey.com/glossary/isna): A pandas method that answers True for each missing value and False for the rest; isna().sum() counts them.
- [items()](https://www.ask-codey.com/glossary/items): A dictionary method that gives each key with its value, one pair at a time, so a loop can name both halves.
- [join()](https://www.ask-codey.com/glossary/join): Glues a list of strings into one string with a separator between them.
- [Kernel](https://www.ask-codey.com/glossary/kernel-python): The Python program that runs a notebook's cells and remembers every name they make, in the order they ran.
- [KeyError](https://www.ask-codey.com/glossary/keyerror): The error Python raises when a dictionary is asked for a key it doesn't have; its message names the missing key.
- [Key-Value Pair](https://www.ask-codey.com/glossary/key-value-pair): One entry in a dictionary: a key and the value stored under it.
- [Keyword Argument](https://www.ask-codey.com/glossary/keyword-argument): An argument passed by naming the parameter, like size="large".
- [Legend](https://www.ask-codey.com/glossary/legend-python): A chart's small key that names each line or set of bars beside a sample of it; matplotlib draws it with ax.legend(), needed only when there's more than one.
- [List](https://www.ask-codey.com/glossary/list): An ordered collection in square brackets that you can add to and change.
- [List Index](https://www.ask-codey.com/glossary/list-index): An item's position in a list, counting from 0.
- [Local Variable](https://www.ask-codey.com/glossary/local-variable): A variable created inside a function; it only exists inside that function.
- [Long Format](https://www.ask-codey.com/glossary/long-format): A table with one row for each value and one column for each kind of value, such as student, quiz and score: simple to filter and group.
- [Marker](https://www.ask-codey.com/glossary/marker-python): The small shape a line chart draws at each point, such as a circle or a square, which tells lines apart without color.
- [math Module](https://www.ask-codey.com/glossary/math-module): A standard module with square roots, pi and other math tools.
- [Membership Operator (in)](https://www.ask-codey.com/glossary/membership-operator-in): in checks whether a value is inside a collection.
- [min() and max()](https://www.ask-codey.com/glossary/min-and-max): Give the smallest and largest value.
- [Misleading Chart](https://www.ask-codey.com/glossary/misleading-chart): A chart that leaves the reader believing something false, often with every number right, through its axis, scale or colors.
- [Module](https://www.ask-codey.com/glossary/module): A Python file whose code you can use in another file.
- [ModuleNotFoundError](https://www.ask-codey.com/glossary/modulenotfounderror): The error Python gives when an import names a package the Python running the code doesn't have installed.
- [Mutable](https://www.ask-codey.com/glossary/mutable): Can be changed after it is created, like a list or dictionary.
- [NaN](https://www.ask-codey.com/glossary/nan-python): Read "not a number": pandas' mark for a missing value in a table.
- [Negative Index](https://www.ask-codey.com/glossary/negative-index): An index that counts from the end: -1 is the last item.
- [Nested List](https://www.ask-codey.com/glossary/nested-list): A list inside another list, like rows and columns.
- [Nested Loop](https://www.ask-codey.com/glossary/nested-loop): A loop inside another loop.
- [nunique()](https://www.ask-codey.com/glossary/nunique): A pandas method that counts how many different values a column holds.
- [open()](https://www.ask-codey.com/glossary/open): Opens a file so you can read from it or write to it.
- [Outlier](https://www.ask-codey.com/glossary/outlier): A real reading far from the usual ones, such as a storm's strongest gust; unlike a mistake, it's true, so it stays in the data.
- [Parameter](https://www.ask-codey.com/glossary/parameter): A name in a function definition for a value the function needs.
- [pass](https://www.ask-codey.com/glossary/pass): Does nothing. A placeholder where Python needs at least one line.
- [Percentile](https://www.ask-codey.com/glossary/percentile): The value a given share of the data sits at or below: 90% of the rents are at or under the 90th percentile.
- [Pivot Table](https://www.ask-codey.com/glossary/pivot-table): A summary laid out as a grid: one column's values down the side, another's across the top, and a total, count or average in every square.
- [pop()](https://www.ask-codey.com/glossary/pop): Removes an item from a list and hands it back (the last one by default).
- [Positional Argument](https://www.ask-codey.com/glossary/positional-argument): An argument matched to a parameter by its position in the call.
- [predict()](https://www.ask-codey.com/glossary/predict): The scikit-learn method that uses a fitted model to guess the label for each row of new features: model.predict(X).
- [PyPI](https://www.ask-codey.com/glossary/pypi): The Python Package Index at pypi.org, the public library of packages that pip downloads and installs from.
- [random Module](https://www.ask-codey.com/glossary/random-module): A standard module for random numbers and picks.
- [range()](https://www.ask-codey.com/glossary/range): Makes a series of numbers, usually to repeat something a set number of times.
- [read()](https://www.ask-codey.com/glossary/read): Reads a whole open file into one string.
- [read_csv()](https://www.ask-codey.com/glossary/read-csv): pd.read_csv loads a CSV file into a DataFrame; usecols, nrows and sep choose the columns, the rows and the separator.
- [Recursion](https://www.ask-codey.com/glossary/recursion): A function calling itself to solve a smaller piece of the same problem.
- [Restart and Run All](https://www.ask-codey.com/glossary/restart-and-run-all): Stopping a notebook's kernel, then running every cell once from top to bottom, so the results are the ones the file really gives.
- [Return Value](https://www.ask-codey.com/glossary/return-value): The result a function hands back with return.
- [Sample Size](https://www.ask-codey.com/glossary/sample-size): How many observations a number rests on, such as the 18 sessions behind a rate; the smaller it is, the further a few rows can move the number.
- [savefig()](https://www.ask-codey.com/glossary/savefig): A matplotlib Figure method that saves the whole chart, or page of charts, as an image file such as a PNG or SVG; the file's ending picks the format.
- [Scatter Plot](https://www.ask-codey.com/glossary/scatter-plot): A chart with one dot for each row, one number across and one up, that shows whether the two numbers move together.
- [scikit-learn](https://www.ask-codey.com/glossary/scikit-learn): The Python package for machine learning: ready-made models, tools to split and prepare data, and scores; installed as scikit-learn, imported as sklearn.
- [Scope](https://www.ask-codey.com/glossary/scope): Where in the code a variable can be used.
- [Set](https://www.ask-codey.com/glossary/set): A collection with no duplicates and no set order.
- [Short-Circuit Evaluation](https://www.ask-codey.com/glossary/short-circuit-evaluation): Python stops checking an and/or as soon as it knows the answer.
- [Slicing](https://www.ask-codey.com/glossary/slicing): Taking a piece of a list or string with \[start:stop\].
- [sort()](https://www.ask-codey.com/glossary/sort): Puts a list in order, changing the list itself.
- [sort_values()](https://www.ask-codey.com/glossary/sort-values): A pandas method that puts a table's rows in order by one column or several, with ascending= for each one's direction.
- [sorted()](https://www.ask-codey.com/glossary/sorted): Gives back a new sorted list and leaves the original alone.
- [split()](https://www.ask-codey.com/glossary/split): Breaks a string into a list of pieces.
- [Standard Library](https://www.ask-codey.com/glossary/standard-library): The modules that come with Python, ready to import.
- [strip()](https://www.ask-codey.com/glossary/strip): Removes spaces from both ends of a string.
- [sum()](https://www.ask-codey.com/glossary/sum): Adds up all the numbers in a list.
- [Tick Label](https://www.ask-codey.com/glossary/tick-label): One of the small labels along a chart's axis, such as a date or a number, that marks a place on the scale.
- [Time Series](https://www.ask-codey.com/glossary/time-series): Values recorded over time, one for each date or moment, such as daily sales or hourly temperatures.
- [to_csv()](https://www.ask-codey.com/glossary/to-csv): A pandas method that saves a table as a CSV file; index=False leaves the row labels out.
- [train_test_split()](https://www.ask-codey.com/glossary/train-test-split): scikit-learn's function that shuffles rows and splits them into a training part and a test part; test_size sets the share held back.
- [Truncated Axis](https://www.ask-codey.com/glossary/truncated-axis): A chart axis that starts above zero; on a bar chart it makes small differences look large.
- [Tuple](https://www.ask-codey.com/glossary/tuple): A list that can't be changed once made, written with round brackets.
- [Tuple Unpacking](https://www.ask-codey.com/glossary/tuple-unpacking): Putting each item of a tuple into its own variable in one line.
- [unique()](https://www.ask-codey.com/glossary/unique): A pandas method that lists each different value in a column once, in the order it first appears.
- [upper() and lower()](https://www.ask-codey.com/glossary/upper-and-lower): Give an all-caps or all-lowercase copy of a string.
- [value_counts()](https://www.ask-codey.com/glossary/value-counts): A pandas method that counts how many rows hold each value of a column, most common first; normalize=True gives shares instead.
- [ValueError](https://www.ask-codey.com/glossary/valueerror): The exception Python raises for a value of the right type that can't be used, such as float("two").
- [while Loop](https://www.ask-codey.com/glossary/while-loop): Keeps repeating as long as its condition stays true.
- [Wide Format](https://www.ask-codey.com/glossary/wide-format): A table that spreads one kind of value across many columns, such as a column for each quiz: quick for people to read.
- [with Statement](https://www.ask-codey.com/glossary/with-statement): Opens something, like a file, and closes it for you when the block ends.
- [write()](https://www.ask-codey.com/glossary/write): Puts text into an open file.
- [zip()](https://www.ask-codey.com/glossary/zip): Pairs up items from two or more lists so you can loop through them together.

- Previous level: [Novice](https://www.ask-codey.com/glossary/subjects/python/novice)
- Next level: [Journeyman](https://www.ask-codey.com/glossary/subjects/python/journeyman)

[Every Python term, by level](https://www.ask-codey.com/glossary/subjects/python)

Source: https://www.ask-codey.com/glossary/subjects/python/apprentice
