Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Am I a retard - else and finally blocks in a try statement
Post: Am I a retard - else and finally blocks in a try s...

Came across this gem today: def reciprocal(n): try: n = 1 / n except ZeroDivisionError: print("Division failed") n = None else: print("Everything went fine...
RubenF85 General Coding Help 6 2,598 Jan-12-2021, 03:35 PM
    Thread: ONE input => THREE outputs
Post: RE: ONE input => THREE outputs

(Jan-12-2021, 01:11 PM)DeaD_EyE Wrote: It looks silly, but works: pos0 = pos1 = pos2 = input()another way: pos0 = input() pos1 = pos0 pos2 = pos0If you change the value of pos0, pos1 and pos2 won't ...
RubenF85 General Coding Help 6 2,647 Jan-12-2021, 03:25 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020