string - Python - How to replace numbers variables -


how replace numbers variables ?

works..

print("\033[1;1h text")  

not works..

x=10 y=20 print("\033[x;yh text") 

or how else it? thank yout

are looking build string values of variables? can use format this

>>> x = 10 >>> y = 20 >>> '\033[{};{}h text'.format(x, y) '\x1b[10;20h text' 

edit:

regarding how replace text can same thing above

'\033[{};{}h {}'.format(x, y, array[i]) 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -