Is there a way to refactor the following Python code so that the number of lines in generation of the dictionary can be reduced?
- data = frame['data'].split(';')
- cat_data = {
- 'xbee_address': '\x00' + frame['source_addr'],
- 'state': data[0],
- 'flow_rate': data[1],
- 'operating_hours': data[2],
- 'operating_minutes': data[3],
- 'operating_seconds': data[4],
- 'hours_until_maintenance': data[5],
- 'number_of_cleansing': data[6],
- 'serial_number': data[7],
- 'item_number': data[8],
- 'month_of_manufacturing': data[9],
- 'year_of_manufacturing': data[10],
- 'software_version': data[11],
- }