How to find the min value in a list of float strings with Python

1 Answer

0 votes
lst = ['4.53', '3.14', '1.24', '4.52', '2.98'] 
  
mn = min(float(fs) for fs in lst) 
  
print(mn) 


 
'''
run:
 
1.24
 
'''

 



answered Dec 20, 2019 by avibootz

Related questions

1 answer 183 views
1 answer 161 views
1 answer 187 views
1 answer 172 views
1 answer 190 views
...