Packt
Advanced Python Features and Functions

il reste 3 jours : Découvrez de nouvelles compétences avec 30% de réduction sur les cours dispensés par des experts du secteur. Économisez maintenant.

Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Packt

Advanced Python Features and Functions

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

2 semaines à compléter
à 10 heures par semaine
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

2 semaines à compléter
à 10 heures par semaine
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Master advanced Python functions like lambdas, decorators, and error handling.

  • Learn how to manage function arguments, including mutable and immutable objects.

  • Understand the practical applications of sequence unpacking and comprehensions.

  • Gain confidence in using Python's more advanced techniques to write cleaner, more efficient code.

Compétences que vous acquerrez

  • Catégorie : Software Design
  • Catégorie : Programming Principles

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

septembre 2025

Évaluations

23 devoirs

Enseigné en Anglais

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

 logos de Petrobras, TATA, Danone, Capgemini, P&G et L'Oreal

Élaborez votre expertise du sujet

Ce cours fait partie de la Spécialisation Python - Complete Python, Django, Data Science and ML Guide
Lorsque vous vous inscrivez à ce cours, vous êtes également inscrit(e) à cette Spécialisation.
  • Apprenez de nouveaux concepts auprès d'experts du secteur
  • Acquérez une compréhension de base d'un sujet ou d'un outil
  • Développez des compétences professionnelles avec des projets pratiques
  • Obtenez un certificat professionnel partageable

Il y a 21 modules dans ce cours

In this module, we will dive into Python functions, explaining their structure and purpose in organizing code. You'll also discover how to call functions, distinguish between parameters and arguments, and explore Python's flexibility with return values and optional parameters. The module wraps up with an introduction to creating concise, one-liner functions in Python.

Inclus

3 vidéos2 lectures1 devoir1 plugin

In this module, we will delve into the different types of function arguments in Python, from mutable and immutable objects to positional arguments. You'll get hands-on practice with essential concepts like *args and learn how to manage both mandatory and optional arguments. The module concludes with a challenge to build a function that combines two lists into a dictionary, reinforcing your understanding of function argument handling.

Inclus

5 vidéos1 devoir1 plugin

In this module, we will explore the versatile capabilities of *args and **kwargs in Python functions. You’ll learn how to manage varying numbers of positional and keyword arguments, which enhances your functions' flexibility and readability. Through practical exercises and tasks, you'll gain hands-on experience combining these techniques to create dynamic and reusable functions.

Inclus

8 vidéos1 devoir1 plugin

In this module, we will focus on default function parameters and how they enhance the flexibility of your functions. You’ll learn how to set default values for parameters, making them optional, and see how this can be combined with positional and keyword arguments to create versatile functions. Hands-on practice will reinforce how to effectively use default parameters in real-world scenarios.

Inclus

2 vidéos1 devoir1 plugin

In this module, we will explore the essential practice of documenting Python code using docstrings. You'll learn how to effectively document your functions, classes, and modules, providing clear descriptions for parameters and return values. We’ll also cover how to implement type hints and best practices for writing docstrings that make your code more accessible to other developers, ensuring maintainability and clarity.

Inclus

4 vidéos1 devoir1 plugin

In this module, we will dive into callback functions and their role in enabling one function to be passed as an argument to another. You'll learn how this technique helps in separating concerns and allowing delayed execution. Additionally, we'll explore best practices for function naming and design to create clean, testable, and reusable code.

Inclus

2 vidéos1 devoir1 plugin

In this module, we will explore the concept of variable scopes in Python, distinguishing between global and local variables. You'll learn how to use the "global" keyword to modify global variables inside functions and understand when and how to use it effectively. Through practical examples, you'll gain a deeper understanding of variable precedence and best practices for avoiding conflicts in your code.

Inclus

4 vidéos1 devoir1 plugin

In this module, we will explore the different types of operators in Python, from arithmetic to logical, and understand their role in forming expressions. You’ll gain clarity on unary and binary operators and their impact on variables and objects. Through hands-on tasks, you'll learn how to apply comparison operators and check element presence in collections like sets, reinforcing your understanding of Python’s operator system.

Inclus

4 vidéos1 devoir1 plugin

In this module, we will explore the concept of falsy and truthy values in Python, focusing on how certain values like 0, False, None, and empty sequences are treated as "false" in conditional statements. You'll also learn about truthy values and how to use these distinctions in your code to streamline logical operations and condition evaluations.

Inclus

2 vidéos1 devoir1 plugin

In this module, we will dive into Python's logical and comparison operators. You'll learn how logical operators work, with a focus on short-circuit evaluation, and how to combine them effectively using parentheses. The module also covers comparison operators for making decisions based on conditions and introduces the "del" statement for removing elements from mutable sequences, expanding your knowledge of Python’s decision-making tools.

Inclus

7 vidéos1 devoir1 plugin

In this module, we will dive into the world of Lambda functions, exploring their syntax and practical use-cases in Python. You'll learn how to return Lambda functions from other functions, enabling dynamic function creation, and see how to use them for tasks like sorting and filtering lists. Through hands-on examples, you'll understand the versatility and efficiency Lambda functions bring to Python development.

Inclus

4 vidéos1 devoir1 plugin

In this module, we will explore Python’s error-handling mechanisms, focusing on the try-except block, as well as the use of else and finally for more control over error handling. You'll also learn to handle multiple types of errors, raise custom errors, and handle specific scenarios like file not found or undefined variables. Through hands-on exercises, you'll gain confidence in managing errors gracefully, ensuring your programs run smoothly even when unexpected situations arise.

Inclus

10 vidéos1 devoir1 plugin

In this module, we will explore the power of sequence unpacking in Python, which allows you to extract values from lists, tuples, and dictionaries directly into variables. You'll learn how to handle different unpacking scenarios, including nested sequences and remaining or selected elements, to simplify your code. Additionally, we will show you how to use unpacking in function calls to pass values as positional and keyword arguments seamlessly.

Inclus

8 vidéos1 devoir1 plugin

In this module, we will explore the dictionary unpacking operator (**) in Python, showing you how to create and modify dictionaries without altering the originals. You'll learn how to merge multiple dictionaries and control the order of key-value pairs, making it easier to manage settings and configurations. Practical examples will help you master the flexibility and power of dictionary unpacking in your Python projects.

Inclus

3 vidéos1 devoir1 plugin

In this module, we will explore Python's conditional statements, focusing on how to use if, elif, and else effectively in your code. You’ll learn how to structure conditions, utilize logical operators, and understand the importance of evaluating expressions. Practical examples, including functions for calculating discounts and school grades, will help you refine your conditional logic skills and improve your Python coding efficiency.

Inclus

10 vidéos1 devoir1 plugin

In this module, we will dive into the ternary operator in Python, showing you how to use it to write concise conditional expressions. You'll learn how to apply it for tasks like toggling user statuses, calculating discounts, and processing data with more efficient conditional logic. Through practical examples, you'll see how the ternary operator can simplify your code and handle complex conditions in a single line.

Inclus

5 vidéos1 devoir1 plugin

In this module, we will explore Python's "for-in" loop, focusing on how to iterate over a variety of sequences like lists, tuples, dictionaries, sets, and strings. You'll learn how to efficiently unpack tuples and use the "range" function within loops. Practical exercises will help you master the flexibility of the "for-in" loop, empowering you to work with diverse data structures and solve real-world problems with ease.

Inclus

6 vidéos1 devoir1 plugin

In this module, we will dive into Python's "while" loop, exploring its condition-based iteration and key differences from the "for-in" loop. You’ll learn how to control loops with the "continue" and "break" statements and how to use "while" loops in practical scenarios, including managing user inputs and creating interactive programs. Hands-on tasks will help you build a solid understanding of controlling flow and handling user-driven decisions in your Python applications.

Inclus

6 vidéos1 devoir1 plugin

In this module, we will explore Python's powerful "for-in" comprehensions, which allow you to create concise, efficient code for transforming and filtering sequences. You'll learn how to use comprehensions for lists, sets, and dictionaries, applying them to real-world examples like converting lists to tuples and merging sequences into dictionaries. Hands-on exercises will help you grasp the full potential of comprehensions, including advanced techniques like nested and conditional comprehensions for more complex tasks.

Inclus

11 vidéos1 devoir1 plugin

In this module, we will dive into Python generators, exploring how they provide memory-efficient solutions for working with large datasets. You’ll learn the differences between generators and sequences like lists and tuples, and see hands-on examples demonstrating their advantages. Practical exercises will help you master iteration over generators and understand their behavior, especially when re-iterating over them.

Inclus

2 vidéos1 devoir1 plugin

In this module, we will dive into Python's decorator functions, which allow you to enhance or modify functions in a clean and modular way. You’ll learn how decorators work with *args and **kwargs for argument handling and see practical examples, like adding security checks or logging functionality. Through hands-on examples, you'll discover how decorators improve the flexibility and maintainability of your code.

Inclus

4 vidéos1 lecture3 devoirs1 plugin

Obtenez un certificat professionnel

Ajoutez ce titre à votre profil LinkedIn, à votre curriculum vitae ou à votre CV. Partagez-le sur les médias sociaux et dans votre évaluation des performances.

Instructeur

Packt - Course Instructors
Packt
965 Cours211 106 apprenants

Offert par

Packt

En savoir plus sur Software Development

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.
Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’
Jennifer J.
Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’
Larry W.
Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’
Chaitanya A.
’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’
Coursera Plus

Ouvrez de nouvelles portes avec Coursera Plus

Accès illimité à 10,000+ cours de niveau international, projets pratiques et programmes de certification prêts à l'emploi - tous inclus dans votre abonnement.

Faites progresser votre carrière avec un diplôme en ligne

Obtenez un diplôme auprès d’universités de renommée mondiale - 100 % en ligne

Rejoignez plus de 3 400 entreprises mondiales qui ont choisi Coursera pour les affaires

Améliorez les compétences de vos employés pour exceller dans l’économie numérique

Foire Aux Questions