Python

Python: Unpacking Operator **kwargs

In this video, we’ll look at the unpacking operator “**” (**kwargs) which accepts unlimited key-value arguments in a function.

def printResult(**kwargs): 
    for key in kwargs: 
       print(key) 
    for value in kwargs.values():
       print(value) 

printResult( num=10, lang="Python")
Verified by MonsterInsights