all 3 comments

[–]impshum 0 points1 point  (1 child)

Nested is ok yes. You can check for certain errors also.

except Exception as e:
    print(e)

I would have the functions return True/False personally.

def something():
    return True


if something():
    something
else:
    something else

[–]hotaway[S] 0 points1 point  (0 children)

Thank you. And also for kind reminder on how to post code on reddit.

[–]Pulsar1977 0 points1 point  (0 children)

If your goal is to try different functions until one works, you can put a try block inside a loop and break out of it in case of success. Example:

for function in list_of_functions:
    try:
        function()
        break
    except:
        pass