From 32a15c835347d67340721300d88fa1b3f3273850 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sat, 30 Oct 2021 17:39:56 +0200 Subject: [PATCH] Better printing: Now with , for every 3-group --- meuro.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meuro.py b/meuro.py index 02f9bba..39c33a5 100755 --- a/meuro.py +++ b/meuro.py @@ -110,14 +110,14 @@ def cliInterface(): eur = float(eurS) meur = euroToMeuro(eur, date) print('Exchange rate for '+date.strftime("%d.%m.%Y at %H:%M")+':') - print(f'{eur:.2f}€ = {meur:.2f}µ') + print(f'{eur:,.2f}€ = {meur:,.2f}µ') elif (m:= reFromMeur.search(arg))!=None: meurS = m.groups()[0] date = _extractDate(arg[:m.span()[0]] + '-' + arg[m.span()[1]:]) meur = float(meurS) eur = meuroToEuro(meur, date) print('Exchange rate for '+date.strftime("%d.%m.%Y at %H:%M")+':') - print(f'{meur:.2f}µ = {eur:.2f}€') + print(f'{meur:,.2f}µ = {eur:,.2f}€') else: print('[!] Unable to parse input')