Python Create Variable If Condition In Html