What are raw string literals?

0 votes
What does "u" and "r" do in python?
Jul 1, 2019 in Python by Waseem
• 4,520 points
38 views

1 answer to this question.

0 votes

raw string literal opens with a sequence of one or more backticks. The raw string literal closes when a backtick sequence is encountered of equal length.

name = 'hello\nwaseem'
print(name)

the output will be:

hello
waseem

answered Jul 31, 2019 by Mohammad
• 3,210 points

Related Questions In Python

0 votes
0 answers

What are the various ways to manipulate a string in Python?

I have a string in Python. I ...READ MORE

Aug 13, 2019 in Python by Arvind
• 2,980 points
64 views
0 votes
1 answer

what are "and" and "or" operators in Python?

AND - True if both the operands ...READ MORE

answered Apr 17, 2018 in Python by Johnathon
• 9,090 points
55 views
0 votes
1 answer

What are the differences between type() and isinstance()?

To summarize the contents of other (already ...READ MORE

answered Jun 4, 2018 in Python by Aryya
• 7,340 points
55 views
0 votes
2 answers

What are the types of dictionary in python?

There are 4 types of dictionary Empty Integer Mixed Dictionary with ...READ MORE

answered Feb 14, 2019 in Python by Shashank
• 1,350 points
77 views
+4 votes
6 answers
0 votes
1 answer

Removing surrounding whitespace

Try the strip() function:  s = s.strip() If you ...READ MORE

answered May 4, 2018 in Python by Nietzsche's daemon
• 4,260 points
63 views
0 votes
1 answer

what are nested if statements in python?

nested if statements are statements with more ...READ MORE

answered May 20, 2019 in Python by Mohammad
• 3,210 points
36 views
0 votes
1 answer

What are the naming conventions for variables and data types in python?

There are certain rules that we have ...READ MORE

answered May 20, 2019 in Python by Mohammad
• 3,210 points
62 views