How to make a function in Python

Publié le: 21 novembre 2022
sur la chaîne: Python Morsels
334
18

To define a function in Python, use the def keyword with the function name and any accepted arguments (in parentheses). Functions have inputs (arguments) and an optional output (the return value).

Read an article version of this video at https://pym.dev/making-a-function/

Find more Python screencasts at https://pym.dev/screencasts/

00:00 Defining a function
00:37 Accepting arguments
01:21 Positional vs keyword arguments
01:38 Default argument values
02:38 Return values
03:44 Use "def" to define a function in Python


Sur cette page du site, vous pouvez voir la vidéo en ligne How to make a function in Python durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Python Morsels 21 novembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 334 fois et il a aimé 18 téléspectateurs. Bon visionnage!