Is there a way in python to turn a try/except into a single line?
something like...
b = \'some variable\' a = c | b #try statement goes here <
b = \'some variable\' a = c | b #try statement goes here
Here is a simpler version of the answer provided by @surendra_ben
a = "apple" try: a.something_that_definitely_doesnt_exist except: print("nope") ... nope