Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

print('print('')')

+1 vote
asked Apr 18, 2020 by aishwarya (130 points) 1 flag
I am a beginner in python .Can anyone explain me why the output is print() ?

1 Answer

0 votes
answered Apr 19, 2020 by QuiiKy _ (460 points)
the output is print() because you are printing print.

by doing print('print(")') you have two single apostrophes surrounding what the program thinks is a string, which in your case is print() .

however, doing print(print("string")) will fix your problem but output will be:

string

None

hope this helps a little
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...