'max of list function error (I am getting max of list "7.0 " even there is "10.0" present

list1 = ['4.7', '7.0', '10.0', '1.0', '2.7', '5.5', '6.0', '4.0', '0.7', '5.0']
print(list1)
print(max(list1))

output

['4.7', '7.0', '10.0', '1.0', '2.7', '5.5', '6.0', '4.0', '0.7', '5.0']

7.0


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source