0

raising an exception

What is the highest number printed by this code? print(0) assert "h" != "w" print (1) assert False print(2) assert True print(3) How does this works?

18th Apr 2020, 7:22 AM
PRIYANKA K
PRIYANKA K - avatar
1 Answer
+ 1
1 The condition in assert expression is tested, and if the result comes up false, an exception is raised. The raise in expression is caused stop execution..
18th Apr 2020, 9:15 AM
Jayakrishna 🇼🇳