May-26-2019, 06:33 PM
Nwb's method is the proper one.
fixed width numbers
|
May-26-2019, 06:33 PM
Nwb's method is the proper one.
May-27-2019, 12:46 AM
(May-26-2019, 06:33 PM)Larz60+ Wrote: Nwb's method is the proper one. how can i put an expression in that method? perfringo's method is obvious.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
For example?
Do you mean like: print(f'Number with leading zeroes{10:020}')
May-27-2019, 07:53 AM
no. can i do this?
print(f'foo is{numbers["foo"]**powers["bar"]:20}')it doesn't work in any form in my older Python 3.5.2. was f'' added in 3.6 or 3.7 ?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
May-27-2019, 08:32 AM
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
May-27-2019, 09:42 AM
then my only choice is your rjust() suggestion which i have already coded. i try to make my code work as far back as 3.3 if it's easy enough, else 3.4 or 3.5. but 3.5.2 is a must, partly because i have run into issues with Ubuntu 18.04 (sudo to root to run bash on amd64 arch fails to source .bashrc file ... it works OK on arm64).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American. |
|