convert python float list to 2 digit

Solutions on MaxInterview for convert python float list to 2 digit by the best coders in the world

showing results for - "convert python float list to 2 digit"
Jackson
31 Jan 2019
1my_list = [0.30000000000000004, 0.5, 0.20000000000000001]
2my_formatted_list = [ '%.2f' % elem for elem in my_list ]