Assigning Function Parameters by Name in Python

Python

 1|  def print_score(name,age,score):
 2|      print(name,'is',age,'and has score of',score)
 3|  print_score(name='Alex Taylor', score=133, age=24)
Did you find this snippet useful?

Sign up for free to to add this to your code library