Here is the simple example of escape sequence. Print("Hello \t World!") Output: Hello World! Print("Hello \b World") Output: Hello World Python3") Output: Python1 Python2 Python3 The list of an escape sequence is given below: Sr. We will discuss how formatting is done in python.Ĭonsider the following example to understand the real use of Python operators. It makes use of the format specifiers used in C programming like %d or %f to map their values in python. To define any string as a raw string, the character r or R is followed by the string. ![]() Raw strings are used in the cases where we need to print the actual meaning of escape characters such as "C://python". It returns true if a particular substring is not present in the specified string. It is also a membership operator and does the exact reverse of in. It returns if a particular sub-string is present in the specified string. It is used to access the characters from the specified range. It is used to access the sub-strings of a particular string. It concatenates the multiple copies of the same string. It is known as concatenation operator used to join the strings given either side of the operator. ![]() Python Tutorial Python Features Python History Python Applications Python Install Python Example Python Variables Python Data Types Python Keywords Python Literals Python Operators Python Comments Python If else Python Loops Python For Loop Python While Loop Python Break Python Continue Python Pass Python Strings Python Lists Python Tuples Python List Vs Tuple Python Sets Python Dictionary Python Functions Python Built-in Functions Python Lambda Functions Python Files I/O Python Modules Python Exceptions Python Date Python Regex Python Sending Email Read CSV File Write CSV File Read Excel File Write Excel File Python Assert Python List Comprehension Python Collection Module Python Math Module Python OS Module Python Random Module Python Statistics Module Python Sys Module Python IDEs Python Arrays Command Line Arguments Python Magic Method Python Stack
0 Comments
Leave a Reply. |