show <br> only if class has certian attribute code example Example: python check if has attribute if hasattr(a, 'property'): a.property