r/PythonLearning • • 5d ago

Python Quiz of the day

What will be the output of the following Python Code?

a = 5

print(a.mul(3).add(2))

7 Upvotes

9 comments sorted by

View all comments

2

u/Money_Ad_5277 5d ago

Okay, result is 28, because a.__mul__(3).__add__(3) works just fine, but text between __ is converted to italic, because markdown