KnowledgeBoat Logo

Computer Science

What will be the output produced by following code ?

>>> print(print("Hola"))

Python

Python Funda

8 Likes

Answer

Output

Hola None

Explanation

First, print("Hola") function is executed which prints the first line of the output as Hola. The return value of print() function is None i.e. nothing. This is passed as argument to the outer print function which converts it into string and prints the second line of output as None.

Answered By

5 Likes


Related Questions