# Write code that takes a two dimensional list of integers # of at least size two, and finds the minimum and # next minimum integer in this two dimensional list. # You are guaranteed that all numbers in the list are unique. # Return the two numbers with a dash between them; # for example, if the incoming list is [[2,3][1,4]] # you would return 1-2. # You may not use any built-in functions/methods besides len(). def min(l1): list1 = l1 result = "" min1 = 0 min2 = 0 i1 = 0 while i1 < len(list1): temp = list1[i1] if len(temp) > 0: min1 = temp[0] i2 = 0 while i2 < len(temp): if temp[i2] < min1: min1 = temp[i2] elif temp[i2] > min1: min2 = temp[i2] i2 = i2 + 1 i1 = i1 + 1 i1 = 0 while i1 < len(list1): temp = list1[i1] i2 = 0 while i2 < len(temp): if temp[i2] > min1 and temp[i2] < min2: min2 = temp[i2] i2 = i2 + 1 i1 = i1 + 1 result = str(min1) + str("-") + str(min2) return result print(min([[2,3],[1,4]]))