What are raw string literals?

0 votes
What does "u" and "r" do in python?
Jul 1 in Python by Waseem
• 4,470 points
20 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 by Mohammad
• 3,060 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 in Python by Arvind
• 2,960 points
39 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,080 points
48 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 ariaholic
• 7,340 points
44 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 in Python by Shashank
• 1,350 points
59 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
47 views
0 votes
1 answer

what are nested if statements in python?

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

answered May 20 in Python by Mohammad
• 3,060 points
27 views
0 votes
1 answer