I am trying to pass a specific key error.by this two.
try:
per_visit_large_store = 100 * dic_data[mac]['Retail Store']['No. of visit to large store']/float(dic_data[mac]['Total no. of walk_in'])
except KeyError: 'Retail Store'
pass
and
try:
per_visit_large_store = 100 * dic_data[mac]['Retail Store']['No. of visit to large store']/float(dic_data[mac]['Total no. of walk_in'])
except KeyError: 'Retail Store':
pass
both of this raises Indentation and syntax error respectively. What exactly I am doing wrong? I am using python 2.7