python print format string example

description: python print format string example

python Using % and .format() for formating print output

1
2
3
4
5
for i in range(1, 60):
interaction = '%s' % ('#' *i)
print('\r{}'.format(interaction), end='')
time.sleep(1)
# #############...

more on search4fan.github.io