Could you please help me why the below code is not working for max and min function in list?
mylist = [ '6','12','13','13','12','10','6','11','5']
set(mylist)
set(['11', '10', '13', '12', '5', '6'])
int(max(mylist))
6
int(min(mylist))
10
int(min(mylist))
10
maxis going to find the lexicographically-largest item in the list first, before converting it to int.max(mylist, key=int)if you want your code to work, but ideally you should use a list of ints to begin with