I\'ve been playing with Python and I have this list that I need worked out. Basically I type a list of games into the multidimensional array and then for each one, it will m
It would be easiest to do this with a dictionary:
app_list = [
['Apple', 'red', 'circle'],
['Banana', 'yellow', 'abnormal'],
['Pear', 'green', 'abnormal']
]
app_keys = {}
for sub_list in app_list:
app_keys["%s_n" % sub_list[0]] = sub_list[0]
app_keys["%s_c" % sub_list[0]] = sub_list[1]
app_keys["%s_s" % sub_list[0]] = sub_list[2]