I'm fairly new to coding, but what this project is asking, is to complete the function so that if a list is empty, it returns the string "does not exist" but currently, it comes up with a bunch of errors. How do I go about adding a function within my lowest_number definition that returns a string if a list is empty (for example, list6)
def lowest_number(num_list):
lowest = num_list[0]
for x in num_list:
if x < lowest:
lowest = x
return lowest
num_listis empty. If so, return the string. Otherwise, do the rest.if not num_list: return 'does not exist'