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
Post a Comment