Escape Characters In Python | What is Escape Characters ? | Python Tutorial For Beginner To Advance
Escape Characters In Python | What is Escape Characters ? | Python Tutorial For Beginner To Advance
समझे आसान भाषा और हिंदी में
\r Carriage Return In Python
What is \r Carriage Return ?
Definition:- In Python, Escape Characters are special characters that are used to represent non-printable or special characters within a string.
It is typically used to manipulate strings in a program, allowing you to format the text and create more readable code.
--- To insert the characters that are illegal in string , we can use escape '\' character.
For Example :-
print('It's Ok!')
Escape character is a backslash '\' followed by which you want to insert.
For Example:-
We will get an error if you use double quotes inside a string that is surrounded by double quotes:
txt = "Python Language is use for several industries that is very useful now a days that is why it called \"Versatile\" Language."
print(txt)
1. \' Single Quote
txt = 'It\'s alright.'
print(txt)
2. \\ Backslash :- We can use double backslash for single
back slash.
txt = "This will insert one \\ (backslash)."
print(txt)
3. \n New Line :- used for new Line
4. \r Carriage Return :- A carriage return is nothing but a simple escape character. \n is also an escape character which creates a new line.
Carriage return or \r is a very unique feature of Python. \r will just work as you have shifted your cursor to the beginning of the string or line.
Whenever you will use this special escape character \r, the rest of the content after the \r will come at the front of your line and will keep replacing your characters one by one until it takes all the contents left after the \r in that string.
5. \t Tab
6. \b Backspace
7. \f Form Feed It is an old technique and used to show
a page break.
8. \ooo Octal Value Example:- txt = "\110\145\154\154\157"
print(txt)
9. \ xhh Hex Value Example :- txt = "\x48\x65\x6c\x6c\x6f"
print(txt)
#escapecharacter
#carriagereturn
#pythontutorial
#pythontutorialforbeginner
#easetocode
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Escape Characters In Python | What is Escape Characters ? | Python Tutorial For Beginner To Advance», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.