Escape Sequences In Python

preview_player
Показать описание
Escape Sequences in Python 3

In the previous Python tutorial, we worked with strings and saw a couple escape sequences in Python 3. In this tutorial, we will concentrate on escape sequences in Python. We use escape sequences in Python to provide a way to incorporate special character coding. We use the backslash(\) to indicate an escape sequence and after the backslash, a letter or letters follow to indicate the proper escape sequence we need.

In my opinion, there are only a couple that you will actually ever use so we will focus on them. If you would like to see the detailed list of escape sequences visit the Python 3 documentation.
Рекомендации по теме
Комментарии
Автор

just a bit of info on the escape sequence of \n. If you guys make a space between the \n and the text, it will execute the line with like an indent (space). For instance, \nBunny01 and \n Bunny02 will be executed like this:
Bunny01
Bunny02

khalidmelouka
Автор

Nice video, helped a lot, thanks! I just have a confusion how the /b sequence works. Because according to the theory in my book /b moves the active position to the previous position in the current line so if you print "234/b567" I thought it would print 2344567 as it would moved back once and would encounter the 4 again during execution

BharathinfinityHegde
Автор

Try running Python from the command line for escape sequences \a, \b, etc.

Chris_-nhig
Автор

didn't hamlet say"to be or not to be"-how do i this output(including the quotes )

NeerajKumar-efmj
Автор

This is a vertical tab does not work for me it shows up with an arrow symbol. this is the coding:J='This is a \v vertical tabAny ideas

alfie
Автор

sir these r not working in python 3, here i will get some dot symbols and arrow symbols

bvenki
visit shbcf.ru