Python keyword arguments 🔑

preview_player
Показать описание
python keyword arguments tutorial example explained

#python #keyword #arguments

# keyword arguments = arguments preceded by an identifier when we pass # them to a function
# The order of the arguments doesn't matter, unlike # positional arguments
# Python knows the names of the arguments that # a function receives

def hello(first,middle,last):
print("Hello "+first+" "+middle+" "+last)

hello(last="Code",middle="Dude",first="Bro")

––––––––––––––––––––––––––––––
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

# keyword arguments = arguments preceded by an identifier when we pass them to a function
# The order of the arguments doesn't matter, unlike positional arguments
# Python knows the names of the arguments that a function receives

def hello(first, middle, last):
print("Hello "+first+" "+middle+" "+last)


hello(last="Code", middle="Dude", first="Bro")

BroCodez
Автор

Never a bad tutorial on the channel, keep up the great work

elliotradley