human
Control a print format when printing a list in Python
assistant
Here is some code to print numbers in list `list` with precision of 3 decimal places

print('[%s]' % ', '.join('%.3f' % val for val in list))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.