Tutorial 16-Position And Keyword Argument In Functions|Python In Hindi|Krish Naik

preview_player
Показать описание
Python functions can contain two types of arguments: positional arguments and keyword arguments. Positional arguments must be included in the correct order. Keyword arguments are included with a keyword and equals sign.
Positional Arguments
An argument is a variable, value or object passed to a function or method as input. Positional arguments are arguments that need to be included in the proper position or order.
The first positional argument always needs to be listed first when the function is called. The second positional argument needs to be listed second and the third positional argument listed third, etc.

A keyword argument is an argument passed to a function or method which is preceded by a keyword and an equals sign. The general form is:
function(keyword=value)
Where function is the function name, keyword is the keyword argument and value is the value or object passed as that keyword.
#postionalargument #keywordargument
Subscribe @Krish Naik Channel For Data Science Videos In English.
Connect with me here:
Рекомендации по теме
Комментарии
Автор

The biggest satisfying factor is, I knew about positional and keyword arguments yet I came here believing that this guy definitely going to tell me something new. If not, at least a way that I can use to explain the topic to others better than I can now and yes, this guy never fails to deliver. Thank you, Sir.

mahinmunx
Автор

Sir, kitne asaan way se samjhate ho aap.. ☺☺☺

yasink
Автор

Sir, the way u explain feels that the topic is so easy

devyaniwaje
Автор

Thankyou so much sir, keep supporting us. We need you sir, your way of explanation make us understand better

saquib_husain
Автор

Hello there, I have create a function
def test(normal= 10, *args):
print(normal)
print(args)

and I create llist l = [1, 2, 3, 4]
then I call test(*l)

I am getting output
1
(2, 3, 4, ) why ?

rashidkhan
Автор

can i run this in jupyter? you directly jumped on this software. we beginners dont know how to use it.

dexxxxxxxx
Автор

Can you share the link for previous vedio about functions. Py

kalyanianusha
Автор

Hi, Krish . Can you do some videos in Kannada. About Excel, PBI, SQL .

Dhuttargi_Arun