avatar Bite 212. Suppressing exceptions

Ever wanted to suppress an exception? Check out Python's contextlib module.

In this Bite you refactor sum_numbers which has some nested try/except statements. Use suppress to make this logic cleaner/ more readable. Have fun and keep calm and code in Python!

Login and get coding
go back Intermediate level
Bitecoin 3X

215 out of 216 users completed this Bite.
Will you be Pythonista #216 to crack this Bite?
Resolution time: ~26 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 2.82 on a 1-10 difficulty scale.
» You can do it! 😌

Focus on this Bite hiding sidebars, turn on Focus Mode.