Spring and Microservices Live Course : https://bit.ly/springmslive
Coupon: TELUSKO25 (25% Discount)
Industry-Ready Java Spring Microservices Developer Live : https://bit.ly/JavaMS2
Complete Java Developer Course : https://bit.ly/Comp-Java-Dev-2
Coupon: TELUSKO20 (20% Discount)
For More Queries WhatsApp or Call on : +919008963671
website : https://courses.telusko.com/
Instagram : https://www.instagram.com/navinreddyofficial/
Linkedin : https://in.linkedin.com/in/navinreddy20
TELUSKO Android App : https://bit.ly/TeluskoApp
Discord : https://discord.gg/D8hWe9BqfF
In this lecture we will discussing Kwargs:
-- Keyword variable length argument
-- we have talk about variable length argument in previous chapter
Variable length argument :
-- A variable-length argument is a feature that allows a function to accept an arbitrary number of arguments.
The syntax for defining a variable-length argument in Python is to use an asterisk (*) before the parameter name.
e.g
def person(name,*data):
print(name)
print(data)
person('navin',28,9765432)
keyword variable length argument:
-- keyword variable length argument is a feature that allows a function to accept an arbitrary number of keyword arguments.
-- use a double asterisk (**) to define a variable-length argument that accepts keyword arguments. For example:
-- the **kwargs parameter allows the function to accept an arbitrary number of keyword arguments. The function can then loop over the dictionary of keyword arguments and do something with them.
e.g
def person(name,**data): #**kwargs
print(name)
for i, j in data:
print(i,j) #i is key and j is value
person('navin',aget=28,city='Mumbai',mob=9865432)
Python Tutorial to learn Python programming with examples
Complete Python Tutorial for Beginners Playlist : https://www.youtube.com/watch?v=hEgO047GxaQ
Python Tutorial in Hindi : https://www.youtube.com/watch?v=JNbup20svwU
Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D
Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN
Github :- https://github.com/navinreddy20/Python-
Editing Monitors :
https://amzn.to/2RfKWgLhttps://amzn.to/2Q665JWhttps://amzn.to/2OUP21a.
Subscribe to our other channel:
Navin Reddy : null.
Telusko Hindi :
null.
Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
http://www.telusko.com/contactus
260 Comments