+ 1
Want to know something new!
We know that in python this print("{:#>5}".format(9)) will print 4 '#'s and 9 at end! I want to do this: a=5 print("{:#>a}".format(9)) How to use it like that?
2 odpowiedzi
+ 2
Today i learn something new.
a=5
a=('{:#>'+str(a)+'}')
print(a.format(9))
0
Alternative to Maninder Singh .
a=5
print(('{:#>'+str(a)+'}').format(9))
#This will not change the value of a!
#Thanks in between to give the idea!