[code]
color = “ffaa”
a = color.ljust(6, ‘0’)
print(a)
[/code]
결과
ffaa00
[code]
color = “ffaa”
a = color.rjust(6, ‘0’)
print(a)
[/code]
결과
00ffaa
[code]
color = “ffaa”
a = color.ljust(6, ‘0’)
print(a)
[/code]
결과
ffaa00
[code]
color = “ffaa”
a = color.rjust(6, ‘0’)
print(a)
[/code]
결과
00ffaa