Skip to content

Commit

Permalink
Merge pull request #845 from adamzr/patch-1
Browse files Browse the repository at this point in the history
Improve stock price formatting
  • Loading branch information
tresni authored Sep 12, 2017
2 parents e920f23 + 0da00c7 commit 107f771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Finance/yahoo-stock.1m.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

color = "red" if change < 0 else "green"

print("{} {:.2f} {:.2f} ({:.2f}) | color={}".format(
print("{} ${:,.2f} {:+.2f} ({:+.2f}%) | color={}".format(
ticker, current, change, pct, color
))

0 comments on commit 107f771

Please sign in to comment.