Is there a way to transform a code like:
total_size = 0 for file in files: if file.size > 1024: raise Exception("file too long") total_si