I am trying to understand the difference in the output of two print functions, and the question I have is, can I print the second example across rather than the way it is currently presented (i.e., down)?
example 1:
def student_details(name, age, class_level):
print(name, age, class_level)
student_details(“Jim”, 16, 10)
#output is:
Jim 16 10
example 2:
def user_details(**kwargs):
for key, value in kwargs.items():
print(f"{key}:{value}")
user_details(name=“Lisa”, age = 25, gender = “Female”)
#Output is:
name:Lisa
age:25
gender:Female