Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert python float list to 2 digit

my_list = [0.30000000000000004, 0.5, 0.20000000000000001]
my_formatted_list = [ '%.2f' % elem for elem in my_list ]
 
PREVIOUS NEXT
Tagged: #convert #python #float #list #digit
ADD COMMENT
Topic
Name
6+8 =