main.py558 chars23 lines
In this code, we first create two empty lists, one to store employee names and another to store their corresponding ages. We then use a for
loop to take input of employee names and ages one by one and append them to their respective lists.
Next, we use the built-in min()
function to calculate the minimum age from the ages
list. We then use another for
loop to iterate over the ages
list and print the name(s) of employee(s) with the minimum age using conditional statements.
gistlibby LogSnag