Блок finally
🔒 Sign in to use this
finally: Гарантия выполнения
Блок finally выполняется всегда, независимо от того, возникло исключение в блоке try или нет. Даже если внутри try или except стоит команда return (выход из функции), Python все равно сначала зайдет в finally, выполнит код там, и только потом завершит работу.
Content is available with subscription.
Get full access to all courses on the platform for one year with a single payment.
▼
▼
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.
🔒 Sign in to use this