RUVIDEO
Поделитесь видео 🙏

PYTHON TUTORIAL#5 | escape sequences in python

Hi everyone. This is our fifth video on python and today we learn about escape sequences in python.
Here's the code:
"""
ESCAPE SEQUENCES
"""
"""
Comments, Escape Sequences & Print Statement
Comments are used to write something which the programmer does not want to execute. Comments can
be written to mark the author's name, date when the program is written, adding notes for your future
self, etc.
Comments are used to make the code more understandable for the programmer.
The Interpreter does not execute comments.
There are two types of comments in Python Language -:
Single Line Comment
Multi-Line Comment
Single Line Comment: Single Line comments are the comments which are written in a single line, i.e.,
they occupy the space of a single line.
We use # (hash/pound to write single-line comments).
E.g., the below program depicts the usage of comments.
"""
#This is a comment
print("Main code started")
"""
Multi-Line Comment: Multi-Line comments are the comments which are created by using multiple
lines, i.e., they occupy more than one line in a program.
We use ' ' '….. Comment ….' ' ' for writing multi-line comments in Python
(Use lines enclosed with three quotes for writing multi-line comments). An example of a multi-line
comment is shown below:
"""
'''This is a comment
Author: Aarush
Date: 26 December 2021
Multi-line comment ends here
'''
print("Main code started")
"""
Python Print() Statement:
print() is a function in Python that allows us to display whatever is written inside it.
In case an operation is supplied to print, the value of the expression after the evaluation is
printed in the terminal. For example,
"""
# print statement for printing strings
print("Aarush is a programmer")

# Print statement with a literal
print(1+87)

#This will print "Aarush is a programmer" and 88 on the screen respectively!
"""
end: end argument allows us to put something at the end of the line after it is printed. In
simple words, it allows us to continue the line with " " or ',' or anything we want to put inside
these quotes of the end.
It simply joins two different print statements using some string or even by space. Example:
"""
# print statement for printing strings
print("Aarush is a programmer", end="**")

# Print statement with a literal
print(1+87)

#This will print "Aarush is a programmer**88" on the screen
"""
Escape Sequences :
An Escape Sequence character in Python is a sequence of characters that represents a single character.
It doesn't represent itself when used inside string literal or character.
It is composed of two or more characters starting with backslash \ but acts as a single character. Example \n depicts a new line character.
Some more examples of escape sequence characters are shown below:

Commonly Used Escape Sequences:
Escape Sequences Description
\n Inserts a new line in the text at the point
\\ Inserts a backslash character in the text at the point
\"
Inserts a double quote character in the text at that point

\' Inserts a single quote character in the text at that point
\t
Inserts a tab in the text at that point

\f Inserts a form feed ln the text at that point
\r
Inserts a carriage return in the text at that point

\b Inserts a backspace in the text at that point
"""
#Please don't remove this line
"""
This is a
Multiline Comment
"""
"""
This is a comment
"""
print("Aarush is \n good boy \t1") #comment after statement

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «PYTHON TUTORIAL#5 | escape sequences in python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.