Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

example for keyword argument in python

# function with 2 keyword arguments
def student(name, age):
    print('Student Details:', name, age)

# default function call
student('Jessa', 14)

# both keyword arguments
student(name='Jon', age=12)

# 1 positional and 1 keyword
student('Donald', age=13)
Source by pynative.com #
 
PREVIOUS NEXT
Tagged: #keyword #argument #python
ADD COMMENT
Topic
Name
3+2 =