└── 1 /1: -------------------------------------------------------------------------------- 1 | # An example function that takes any number of keyword arguments 2 | def info(**students): 3 | print("This year students info:") 4 | for name, major in students.items(): 5 | print(f"- {name}: {major}") 6 | print("\n") 7 | 8 | # Example run 9 | info(Alice="Physics", Bob="Maths") 10 | 11 | info(Alice="Applied Physics", Bob="Maths", 12 | Charlie="Pharmaseutics", David="Fluid Mechanics") 13 | --------------------------------------------------------------------------------