Advertisement
marcgruita

siget

Oct 29th, 2022
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. data = [["Rafael", 10, 10, 10, 8], ["Marc", 10, 2], ["Luci", 4, 8]]
  2.  
  3. target = 11
  4. for grades in data:
  5.     for grade in grades[1:]:
  6.         if grade < target:
  7.             target = grade
  8.  
  9. for grades in data:
  10.     if target in grades[1:]:
  11.         print(grades[0])
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement