Why use Functions in Python?

Pubblicato il: 09 marzo 2023
sul canale di: CBT Nuggets
1,596
31

CBT Nuggets trainer John McGovern covers functions in Python. This video is part of a course that covers Python programming language basics that network engineers should know. If you find this video helpful, consider watching our entire Python Functions Tutorial course: https://training.cbt.gg/urp

A Python function can be understood as a group of code. It can be any type of code — ranging from something exceedingly simple that produces a single result to a highly complicated series of information pulls and processes that result in a larger result. Some functions are built into the Python library. Other functions are developed by third parties and can be incorporated or introduced to your instance of Python. There are also custom functions that you write yourself for unique purposes.

What functions do is allow code to be reusable. Using functions makes your code modular – meaning it can be applied in other projects and in different contexts. Written properly, code can be general, rather than specific. If you plan ahead and write functions, you can avoid repeating yourself, and instead write very little code and just tweak and modify it each time you paste it into a new use case.

0:00 – Introduction: Python functions, what they are and why they're helpful
0:15 – Defining a function in Python
0:35 – Three different types of functions: built-in, 3rd party, custom
1:00 – Why bother writing a function, if it's simply a group of code?
1:15 – One of programming's most important rules is DRY: Don't Repeat Yourself
1:35 – Functions always return a result
2:15 – First-hand example of writing a Python function
7:40 – Outro: what you can expect from future videos in this series


Watch this entire Python Functions Tutorial course: https://training.cbt.gg/urp

Not a CBT Nuggets subscriber? Start your free week: https://www.cbtnuggets.com/signup

Check out John's other courses: https://www.cbtnuggets.com/trainers/j...

New IT Training releases: https://training.cbt.gg/x85
-----------------
Connect with CBT Nuggets for the latest in IT training:
• Twitter -   / cbtnuggets  
• Facebook -   / cbtnuggets  
• Instagram -   / cbtnuggets  
• LinkedIn -   / cbt-nuggets  

#python #pythonfunctions #visualstudio #pythonlibraries #ittraining #itcertifications #cbtnuggets


In questa pagina del sito puoi guardare il video online Why use Functions in Python? della durata di ore minuti seconda in buona qualità , che l'utente ha caricato CBT Nuggets 09 marzo 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,596 volte e gli è piaciuto 31 spettatori. Buona visione!