May-26-2019, 01:48 PM
(May-26-2019, 08:16 AM)Nwb Wrote: Ah okay so you want to add leading zeroes.read my first post. i have been doing leading zeroes. now i want to do leading spaces.
You can use string formatting to do this very easily.
print(f'{number:0(length)}')
eg:
>>> print(f'{10:020}') 00000000000000000010
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.