I am trying to sort through my data, but it is coming back as one big array. I want to split the array from the 0 index to the 7th index, put it into its own array, and then do the same for the next 7, and then the next 7 until it goes through the whole array. Below is the code that I tried, but it did not work.
restaurant_list = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
'', '',]
def parse_restaurant_data(data):
final_list = []
for i in range(len(data[0:])):
each_restaurant = data[0:7][i]
final_list.append(each_restaurant)
print(final_list)
parse_restaurant_data(restaurant_list)