Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
- The
finally
statements are guaranteed to be executed (presuming no power outage or anything outside of Python's control) after atry
/except
block runs even ifreturn
,break
Returns and Jumps in Kotlin
Break at label is a convenient way to jump out of a nested loop.
Update a Line in Standard Output
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
The trick is to use \r
(return) instead \n
(return and new line).
I will use Python to illustrate.
The following Python code
:::Python import sys
for idx in range(5 …