मराठी

Write a function to push any student's information to stack.

Advertisements
Advertisements

प्रश्न

Write a function to push any student's information to stack.

कोड लेखन
Advertisements

उत्तर

student_stack = []


def push_student(name, roll_number, marks):
    student = {
        "name": name,
        "roll_number": roll_number,
        "marks": marks,
    }
    student_stack.append(student)  # Push student information
    print("Student information inserted")


push_student("Riya", 101, 92)
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Stacks & Queues in list - EXERCISE [पृष्ठ १२३]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 6 Stacks & Queues in list
EXERCISE | Q 24. | पृष्ठ १२३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×