EdmontonPy
Inspired by the Python community, we hope to foster a strong, supportive, and proficient Python community in the Edmonton area.
edmontonpy.com
@edmontonpy
edmontonpy.slack.com
Lewis Gunsch
Gord Nuttal
Python 3.8 Alpha
Add leading zeros
for i in [1, 11, 222, "aaa", 1234]:
str(i).zfill(4)
'0001'
'0011'
'0222'
'0aaa'
'1234'
# or just numbers
print(f'{i:03}')
NEXT MEETUP ON MARCH 11th
By EdmontonPy
Inspired by the Python community, we hope to foster a strong, supportive, and proficient Python community in the Edmonton area.