Skip to content
CBT Nuggets
DemoBook a Demo

Python Functions Tutorial

Python

Associate · Developer

This Python Functions Tutorial training covers how to write functions in Python, special blocks of code that only run at certain times throughout your program. You’ll learn how to work with Python functions, from understanding parameters and arguments to writing code blocks that execute only when called.

Updated June 2022

16Skills
94Videos
14hTotal

Who This Course Is For

This Python Functions Tutorial training is considered foundational-level open-source training, which means it was designed for software developers. This programming skills course is valuable for new IT professionals with at least a year of experience with Python best practices and experienced software developers looking to validate their open-source skills.

Skills Your Team Will Gain

  • Understanding functions in programming generally and in Python specifically
  • Writing blocks of code in Python that only run when they get called
  • Understanding the small differences between parameters and arguments
  • Passing arguments in the right order

Course Curriculum

One skill is free to watch — no signup needed. The other 15 premium skills unlock for your whole team with a CBT Nuggets plan.

Free skill preview

Understand Functions in Python

John McGovernDuration: 54m12 videos

Watch this complete skill free — the same trainer, videos, and labs your team gets with a plan.

Watch free skill
  • Understand Functions in PythonFree54m · 12 videos
  • Premium skill.Implement Functions in Python49m · 12 videos
  • Premium skill.Understand Functional Programming in Python55m · 14 videos
  • Premium skill.Decorators & Generators54m · 20 videos
  • Premium skill.First-Class Functions in Python54m · 14 videos
  • Premium skill.Higher-Order Functions in Python52m · 14 videos
  • Premium skill.Introduction to Partial Application and Currying54m · 14 videos
  • Premium skill.Advanced Higher-Order Functions56m · 14 videos
  • Premium skill.Advanced Partial Application & Currying51m · 14 videos
  • Premium skill.Introduction to Memoization48m · 12 videos
  • Premium skill.Composing Functions in Python54m · 14 videos
  • Premium skill.Advanced Memoization48m · 12 videos
  • Premium skill.Introduction to Recursion in Python47m · 12 videos
  • Premium skill.Recursion with Lists49m · 14 videos
  • Premium skill.Working with Trees in Python52m · 14 videos
  • Premium skill.Basic Tree Algorithms in Python51m · 14 videos
Want to browse the locked skills?
with no purchase required. Already have an account?

An account gets you the full catalog to browse, pre-assessments, quiz questions on free skills, and IT Trainerbot, with every answer citing its source video.

Put this course to work for your team

Every subscription includes this course with the full library, virtual labs, and practice exams — or talk it through with sales.

For IT leaders

What IT leaders need to know before assigning this course

Many IT teams write Python that works but is hard to maintain: repeated logic copied across scripts and validation code tangled into every function. This course gives your developers and automation-focused IT practitioners a shared, structured approach to writing modular, reusable Python functions.

Role fit: Built for software developers and IT professionals with roughly a year of Python experience. Early skills are taught in a network-engineering context, such as passing keyword arguments to build device connection details, so it also suits network engineers moving into automation. Later skills cover first-class functions, higher-order functions, comprehensions, and reusable argument-checking patterns that make functions more flexible.

Time investment: 16 skills totaling about 13.8 hours. That is roughly two to three weeks per learner at one hour a day. A Team Lead can use the skill breakdown to plan assignments around the team’s Python responsibilities.

Change-management note: The course repeatedly stresses small, single-responsibility functions. It also shows how to move argument checking into reusable higher-order functions instead of repeating it in every function body. Teams that adopt these patterns get a common vocabulary for code reviews and more consistent internal tooling. That consistency also makes it easier to bring new hires up to speed on shared codebases.

How CBT Nuggets supports adoption: Training Managers can add the course to a Playlist alongside related Python training. Team Reporting lets an IT Director track progress across the team and confirm that assigned skills are completed.

Team Impact

How this training helps your team succeed

IT teams take this training to replace copy-paste scripts with small, modular, reusable Python code that is easier to maintain, test, and hand off. The course is grounded in practical examples of reusable functions, first-class functions, lambdas, modules, and functional programming patterns.

  • Faster, safer changes: When logic lives in one well-defined function, your team updates it in one place instead of editing scattered lines across a script. That reduces the risk of inconsistent fixes.
  • Cleaner, single-responsibility code: Practitioners use higher-order functions and decorators to add argument checks and performance tracking without cluttering function bodies. The course shows how first-class functions can make performance testing easier without changing the rest of the code.
  • Better performance on heavier workloads: Memoization and generators help developers avoid repeated work and reduce memory use in the right situations, especially when functions would otherwise recalculate or store more data than necessary.
  • Structured handling of hierarchical data: Recursion and tree traversal concepts prepare your team to work with nested data that plain lists and dictionaries do not always represent well.

The result is a team that writes less repetitive, more readable Python, so automation code stays maintainable as it grows.

After completion

Capabilities your team walks away with

Knowledge

  • How Python functions work, including parameters, arguments, and the difference between positional and keyword arguments
  • Functional programming concepts in Python, including list, dictionary, and set comprehensions and how they relate to functional approaches
  • How first-class and higher-order functions let code assign, pass, return, and manipulate other functions, and how decorators build on this
  • How generators work and why they matter for memory efficiency
  • How partial application, currying, and composition reduce repetition and improve readability
  • How function composition combines functions by calling one function with the result of another

Ability

  • Write modular, reusable functions so a change in one place carries through every call
  • Use higher-order functions to add argument checking and performance tracking without cluttering function bodies, keeping each function to one responsibility
  • Apply partial application and currying, both manual and automatic, to build flexible interfaces such as a reusable URL builder for API requests
  • Compose small functions into larger ones that solve real-world problems
  • Use functional patterns to reduce repeated logic and make code easier to manage
  • Work with comprehensions, lambda functions, and map to apply functions across iterable data

Readiness check

Confirm prerequisite knowledge before training begins

A short placement assessment on the CBT Nuggets assessments platform measures whether a learner already has the foundation this course assumes. IT leaders use it to put the right people in the right training — and any learner can take it right now to make sure they'll get full value from day one.

  • Questions generated from this course's own video transcripts — what gets measured is exactly what gets taught
  • Instant, per-learner results that show whether the prerequisite foundation is in place
  • Results roll up into team readiness reporting, so training hours go where they change outcomes
Runs on assessments.cbtnuggets.com — sign in with an Adept account so results roll up into team readiness reporting. Need one?
.

If gaps show up, start here

Python for Network Engineers

This foundational Python for Network Engineers course equips you with the practical scripting skills needed to automate modern networks. Designed for networking professionals with zero Python experience, this course will help you learn Python fundame...

~22h

This course is included with every plan

Unlock this one course, or get one learner — or your whole team — access to all 294 courses, virtual labs, and practice exams.

Course Unlock

Just need this course?

$75one time

No subscription

One year of access to Python Functions

CBT Nuggets Individual

Includes IT Trainerbot Plus

$49per month

Billed annually

Every course, for one learner

See Individual pricing
For IT teams

CBT Nuggets Teams

IT Trainerbot for every seat

$59per seat / mo

Billed annually

From 1 learner seat · unlimited admin seats

Checking your access…

Frequently Asked Questions

What are functions in Python?

Python is a computer programming language made popular thanks to its simplicity and versatility. Like any programming language, Python uses blocks of reusable code to perform specific tasks – these are called functions. Functions are parts of a larger body of code that take arguments as inputs, process them, and return values as outputs. Those outputs may get processed by additional functions or used as end results for the user.

Is Python a useful language to learn?

Yes, Python is a very useful language to learn – whether you work as a computer programmer, web developer, data analyst, or just about anything else. Python's versatility is what makes it so useful to learn – it's used in tons of different contexts. Python is prominently used in web development, data analysis, and even artificial intelligence. It has a huge ecosystem of libraries and frameworks, and it's wildly popular and well-supported.

What are the essential components of a function in Python?

A function in Python has three essential components, those are a name, parameters (which are actually optional), and a body. A Python function's name identifies the function and gets referenced in code to use it. Python parameters are input variables that are available to the function for processing. The body of a Python function is the statements that define its functionality. Functions can also return a value and end its execution.

Who should take this tutorial course on Python functions?

Professionals from many different fields should take the time to learn how Python functions work. Software developers, data analysts and research professionals top the long list of who could benefit from learning the programming language. Python is great for modular programming and code organization, it's preferred for efficient data processing and analysis, and it emphasizes reusable code components. Professionals in many different fields, including research, AI/ML and automation thrive with Python.

Is it hard to learn Python?

No, it's not considered very hard to learn Python, especially when you have a tutorial course that can orient you on the syntax, readability and versatility of the language and its functions. Beginners like the simple syntax of the Python programming language, but seasoned programmers find its versatility and depth to be its best attribute. Python's advanced concepts can pose a challenge for beginners, but with proper guidance it's a very learnable language.

Ready to upskill your team?

See how IT leaders fit this course into a team training plan, and what a plan costs for your team's size.