Jun-01-2020, 02:09 AM
Hi thanks for the reply. I tried to run the code.
thanks,
txt = '\x1B[3m This is italic text \x1B[23m' print(txt)I am using Sublime a text editor. I saved the file as .py. When I run the code and it prints in Sublime the text editor output says,
Output:<0x1b>3m This is italic text <0x1b> [23
I also tried to open the .py file in the Python 3.8.3 shell and the output wasn't italic text. Output:[3mThis is italic text [23m
One last question about dealing with string data type. When I make a variable and assign the text to the variable the text has to be in quotation marks. The book I am reading appears to recommend double quotes. Do you think that is right? Why are you using a single quote?thanks,