MENU
Question -

Write a program to illustrate “Keyword arguments”.



Answer -

#!/usr/bin/python
# Function definition is here
def printme(str):”Thisprints a passed string into this function”
print str;
return;
# Now you can call printme function
printme(str=”My string”);
When the above code is executed, it produces following result:
My string

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×