KnowledgeBoat Logo

Computer Science

Predict the output:


a, b = 12, 13
print (print(a + b))

Python

Python Funda

37 Likes

Answer

Output

25
None

Explanation

  1. a, b = 12, 13 ⇒ assigns an initial value of 12 to a and 13 to b.
  2. print (print(a + b)) ⇒ First print(a + b) function is called which prints 25. After that, the outer print statement prints the value returned by print(a + b) function call. As print function does not return any value so outer print function prints None.

Answered By

16 Likes


Related Questions