A tuple have details about a hospital. The details are ward number, number of adults and number of children in that ward. There are n wards in the hospital. Display the number of adults in the ward number specified by the user (doctor). Display the ward that has maximum children
#Assuming there are 3 wards in the hospital, the tuples below contain their information
list1 = [('ward1', 45, 20), ('ward2', 35, 30), ('ward3', 3, 30)]
list2 = []
for i in list1:
print(i[1])
list2.append(i[2])
print(max(list2))
45
35
3
30
Comments
Leave a comment