for app in apps_data[1:]:
price = float(app[4])
# Complete code from here
if price == 0:
app.append('free')
elif price > 0 and price < 20:
app.append('affordable')
elif price >= 20 and price < 50:
app.append('expensive')
elif price >= 50:
app.append('very expensive')
apps_data[0].append('price_label')
print(apps_data[:6])
Its the last bit im confused by
apps_data[0].append('price_label')
print(apps_data[:6])
This looks like it will append âpricelableâ at the first coloum. But when you run the code its printed out last? as you can see below. and is the [:6] printing the first 6 headers? because the output shows many more.
Thanks
[['id', 'track_name', 'size_bytes', 'currency', 'price', 'rating_count_tot', 'rating_count_ver', 'user_rating', 'user_rating_ver', 'ver', 'cont_rating', 'prime_genre', 'sup_devices.num', 'ipadSc_urls.num', 'lang.num', 'vpp_lic', 'price_label'], ['284882215', 'Facebook', '389879808', 'USD', '0.0', '2974676', '212', '3.5', '3.5', '95.0', '4+', 'Social Networking', '37', '1', '29', '1', 'free'], ['389801252', 'Instagram', '113954816', 'USD', '0.0', '2161558', '1289', '4.5', '4.0', '10.23', '12+', 'Photo & Video', '37', '0', '29', '1', 'free'], ['529479190', 'Clash of Clans', '116476928', 'USD', '0.0', '2130805', '579', '4.5', '4.5', '9.24.12', '9+', 'Games', '38', '5', '18', '1', 'free'], ['420009108', 'Temple Run', '65921024', 'USD', '0.0', '1724546', '3842', '4.5', '4.0', '1.6.2', '9+', 'Games', '40', '5', '1', '1', 'free'], ['284035177', 'Pandora - Music & Radio', '130242560', 'USD', '0.0', '1126879', '3594', '4.0', '4.5', '8.4.1', '12+', 'Music', '37', '4', '1', '1', 'free']]