I am trying to use f-strings
to print some parts of text in italic format.
Browsing the web for "python"+"print"+"italic"+"f-strings"
, I found these ANSI codes should do the work : '\x1B[3m'
and '\x1B[0m'
; although they don't :
print(f'\x1B[3m italic \x1B[0m' + f'not italic')
gives no italic output :
italic not italic
Am I missing some update?
My python version is 3.9.7 and I'm using Jupyter Notebook
.