‘print(“print”)’ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

‘print(“print”)’

How to output ‘print(“print”)’? >>>Solved! Thank you for answer my question! I meant How to print 'single quotation surrounded words within (“ double quotation and parentheses “) ’ So the answer which worked was this. >>>print("""'print("print")'""") prints 'print("print")' Thank you.

13th Jul 2018, 3:54 AM
Mariko Daiba
Mariko Daiba - avatar
7 Answers
+ 12
print('print("print")') prints print("print") print("""'print("print")'""") prints 'print("print")'
13th Jul 2018, 5:05 AM
David Ashton
David Ashton - avatar
+ 8
Hello, Mariko Daiba ! The print Python function prints the specified objects to a standard output device (screen) or sends them a text stream to a file. The complete syntax of print(): print (*objects, sep=' ', end = 'n', file = sys.stdout, flush = False); objects - the object to be displayed * means that there can be several objects; sep - separates objects. The default value is ''; end - is put after all objects; file - the object with the write (string) method is expected. If no value is specified, the sys.stdout file is used to output the objects; flush - if set to True, the thread is forced to be reset to a file. The default value is False. by the way, look at the lessons from SoloLearn https://www.sololearn.com/Course/Python/?ref=app
13th Jul 2018, 4:02 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 7
Whoever is downvoting these answers: 1. I think it's kind of childish. 2. Your identity is visible to higher level mods.
15th Jul 2018, 5:15 AM
David Ashton
David Ashton - avatar
+ 3
print("This is how you would print a STRING object in python") print(12.3) #this prints out a float. integer_=4 type(integer_) #this tells the data type
15th Jul 2018, 5:03 AM
Apple Blossom
Apple Blossom - avatar
+ 2
print("'print(\"print\")'") " ' ... ' "
13th Jul 2018, 10:03 AM
Микола Федосєєв
Микола Федосєєв - avatar
+ 1
try this print """ 'print("print")' """
13th Jul 2018, 1:26 PM
Akash Verma
+ 1
there are 4 ways , I think 😂✋ 1/ print( 'print("print")' ) 2/ print( "print('print')" ) 3/ print( 'print(\'print\')' ) 4/ print( "print(\" print\")" )
13th Jul 2018, 3:21 PM
Ahmad Muhammad
Ahmad Muhammad - avatar