Python Program to Print Student Details

Let’s have a glance at the Python program which will help you to print students’ details like name, age, address in a separate line.

Python Program to Print Student Details

def student_details():
    name, age = "Mike", 25
    address = "Mumbai, Maharashtra, India"
    print("Name: {}\nAge: {}\nAddress: {}".format(name, age, address))

student_details()

Output

Name: Mike
Age: 25
Address: Mumbai, Maharashtra, India

Leave a Comment

Your email address will not be published. Required fields are marked *