I want to convert a python boolean into JS's boolean literal. This is what I am working with:
store = dict(vat=True)
if store['vat']:
store.update({'vat': 'true'})
else:
store.update({'vat': 'false'})
Is there a more less verbose way to replace this code snippet ?
store['vat'] = 'true' if store['vat'] else 'false'