+ 1

Command for output ("First string, Second string") double quotations r included in the output but parentheses r not...should be?

please answer for python

6th Dec 2017, 3:32 AM
Aakash Kumar
Aakash Kumar - avatar
7 Antworten
+ 10
Double and single quotations frame a sequence of characters to form a string. The brackets frame the string itself as a parameter, so yes. It is print('string') and not print'(string)'
6th Dec 2017, 4:01 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
print('("First string, Second string")')
6th Dec 2017, 5:00 AM
David Ashton
David Ashton - avatar
+ 4
Are you talking about using print()?
6th Dec 2017, 3:41 AM
David Ashton
David Ashton - avatar
+ 3
Without parentheses: print('"First string, Second string"') surrounding double quotes with single quotes You can also use the \ escape character: print("\"First string, Second string\"")
6th Dec 2017, 6:03 PM
David Ashton
David Ashton - avatar
+ 1
Nice try sir...but as I enquired parentheses should not be in output
6th Dec 2017, 2:26 PM
Aakash Kumar
Aakash Kumar - avatar
+ 1
absolutely..sir...this is the right answer... thanks for assistance
6th Dec 2017, 6:07 PM
Aakash Kumar
Aakash Kumar - avatar
0
Great Minds...I want the output as I mentioned above...but in python so what would be the code in python to get same output as above
6th Dec 2017, 4:54 AM
Aakash Kumar
Aakash Kumar - avatar