Hi does anyone know if I can filter a nested list to return only the second value in each sub-list? I can do it using a for-loop, just wondering if it possible to use the filter method?
weather_data = [['1', 'sunny'], ['2', 'rainy'], ['3', 'sunny']]
return:
weather = ['sunny', 'rainy', 'sunny']