Skip to content

Commit 675c9ad

Browse files
committed
Try .format() instead of % ( )
1 parent 689b14c commit 675c9ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Work/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ def read_prices(filename):
4545
current_value += h['shares']*prices[h['name']]
4646

4747
print(f'Current value: {current_value:10.2f}')
48-
print('Gain: %10.2f' % (current_value - portfolio_value))
48+
print('Gain: {:10.2f}'.format(current_value - portfolio_value))

0 commit comments

Comments
 (0)