Python - Function Argument Unpacking

Publié le: 03 mai 2020
sur la chaîne: Parag Dhawan
272
7

Python - Function Argument Unpacking
in python function argument unpacking is done by * and ** operator while calling function.
Examples:
Function Argument Unpacking

def func(a,b):
print(f"{a},{b}")

func(1,2)
list1=[1,2]
func(list1)
func(*list1)
tuple1=(10,20)
func(*tuple1)
exp = (x * x for x in range (1,3))
func(*exp)
def func(a,b):
print(f"{a},{b}")
new_dic = {'a':1,'b':2}
func(**new_dic)
func(*new_dic)

============================================================================= Link for Tutorial Series

Jupyter Notebook Tutorial Series:-
   • How To Open Jupyter Notebook in Windows  

Python Tutorial Series:-
   • Introduction to Python | Python Applications  

Python Assignments and Objective Questions:-
   • Objective Questions Python - 1  

Tech. Videos By Parag Dhawan    • Template Matching Using OpenCV (Python) | ...  
============================================================================= Feel free to connect and ask your queries:-

Linkedin:-   / parag-dhawan  
Youtube:-    / paragdhawan  
Facebook Page:- http://fb.me/dhawanparag
Instagram: -   / paragdhawan  
Twitter:-   / dhawan_parag  
GitHub:- https://github.com/paragdhawan/
Facebook Profile:- https://www.facebook.com/profile.php?...

============================================================================= Show your support by Subscribing to the channel:-
https://www.youtube.com/c/ParagDhawan... ============================================================================= Link of Next video:-    • Python Built-in Functions abs() | abs()  
=============================================================================
#ParagDhawan
#PythonCrashCourse
#Python
#PythonTutorialForBeginners
#PythonForDataScience
#PythonProgramming
#PythonProgrammingLanguage
#PythonTutorial
#PythonCode
#Python3

=============================================================================
Note: Watch the video at a speed of 1.5


Sur cette page du site, vous pouvez voir la vidéo en ligne Python - Function Argument Unpacking durée online en bonne qualité , qui a été Téléchargé par l'utilisateur Parag Dhawan 03 mai 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 272 fois et il a aimé 7 téléspectateurs. Bon visionnage!