Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## List of multiple students
l = [('Ram',80,90),('seeta',50,30),('Jerry',20,45),('Bellow',60,70),('Geeta',98,78)]
## For checking the marks ## iterating over list
## First unzipping each element as it is stored as a tuple.
## If you don't know this concept don't worry will cover this in intermediate python.
## Here just for your understanding how useful to define a function
for e in l:
student(*e)
#[Output]:
# Ram is very good student with marks 85
# seeta needs improvement 40
# Jerry needs improvement 32
# Bellow is average student with marks 65
# Geeta is very good student with marks 88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.