+ 3

>>> """Customer: Good morning. Owner: Good morning, Sir. Welcome to the National Cheese Emporium."""

Why in string print single quotation ? In code above automatically make new line yes!

26th Jul 2020, 1:00 PM
Salsabeel Alhams
Salsabeel Alhams - avatar
10 Respuestas
+ 5
Salsabeel Alhams python uses quotation marks to just identify a string. If you display a string using quotation marks then quotation marks will not b displayed. Her have a look at this hello world code👇 https://code.sololearn.com/cGBzmkEyPPdU/?ref=app
26th Jul 2020, 2:05 PM
Arsenic
Arsenic - avatar
+ 4
Salsabeel Alhams ok I am getting your problem. You want to ask that how string is printed in single quote instead of double or no quote. I think that's because of python shell/python IDE which executes directly. As it is a string so, it should be printed in quotes... >>> "Hello" 'Hello'
26th Jul 2020, 2:09 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 3
Use backslash to print it. print(" \' hello\' ") Output:- 'hello'
26th Jul 2020, 1:05 PM
Arsenic
Arsenic - avatar
+ 2
Paste your code link to understand more accurately. https://www.sololearn.com/post/75089/?ref=app
26th Jul 2020, 1:51 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 2
Salsabeel Alhams also reframe your question and elobarate your problem
26th Jul 2020, 1:53 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
Arsenic It is true that I know, so I was amazed at why quotation marks appear during printing Thanx
26th Jul 2020, 2:08 PM
Salsabeel Alhams
Salsabeel Alhams - avatar
+ 1
AKSHAY Yes , but the true answer it print Hello without qoutation mark yes?
26th Jul 2020, 2:21 PM
Salsabeel Alhams
Salsabeel Alhams - avatar
+ 1
Salsabeel Alhams learn to use escaping character "\" in programming. Most of the programming languages uses escaping characters.
26th Jul 2020, 2:33 PM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
0
Not hello only without quotation mark?
26th Jul 2020, 1:08 PM
Salsabeel Alhams
Salsabeel Alhams - avatar