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.
7 Answers
+ 12
print('print("print")') prints print("print")
print("""'print("print")'""") prints 'print("print")'
+ 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
+ 7
Whoever is downvoting these answers:
1. I think it's kind of childish.
2. Your identity is visible to higher level mods.
+ 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
+ 2
print("'print(\"print\")'")
" ' ... ' "
+ 1
try this
print """ 'print("print")' """
+ 1
there are 4 ways , I think 😂✋
1/ print( 'print("print")' )
2/ print( "print('print')" )
3/ print( 'print(\'print\')' )
4/ print( "print(\" print\")" )