+ 1

What is the correct string to be? kept in double quotation marks

28th Jun 2019, 2:45 PM
Aishwarya
2 Respostas
+ 11
With Python, the use of ' ' or " " is basicaly the same, and defines strings. Choosing one over the other allows you to insert the non-chosen quote mark inside the string. a = "it's a string" will be fine a = 'it's a string' won't b = 'this is a "quote".' is ok b = "this is a "quote"." is not. Then, if you need ' and " in your string, you can use triple quotes as in: c = """it's a "quote" in a string"""
28th Jun 2019, 3:42 PM
Cépagrave
Cépagrave - avatar
+ 1
First and last must be same . Qoutaion..Inside strings given .. content
28th Jun 2019, 4:42 PM
Rajkumar
Rajkumar - avatar