I am new to Python and still learning the tricks.
How can i convert the following code to a single liner, is it possible in Python? There has to be a neat way of doing this.
try:
image_file = self.request.files['image_path']
except:
image_file = None