Python idiom for '... if ... else ...' expression - by rukeba Hello! How to write the exprission shorter: return '%.0f' % float_var if float_var else float_var or if float_var: return formatted_string else: return None Thanks! Read the article