- 3

what am i doing wrong?

grocery_list = ['juice', 'tomatoes', 'potatoes','bananas'] print('First Item', grocery_list[0]) grocery_list[0] = 'Green Juice' print('First Item', grocery_list[0]) print(grocery_list[1:3]) other_events = ['Wash Car', 'pick up kids', 'cash check'] to_do_list = [other_events, grocery_list] print(to_do_list) print((to_do_list[1][1])) grocery_list.append('Onions') print(to_do_list) grocery_list.insert(1, "Pickle") grocery _list.remove("Pickle") grocery_list.sort() grocery_list.reverse() del grocery_list[4] print(to_do_list)

3rd Jul 2017, 1:37 PM
code-junkie
code-junkie - avatar
1 Réponse
+ 1
there's a blank space between "grocery" and "_list" when you remove "Pickle"...
3rd Jul 2017, 1:52 PM
2_3rr0r5
2_3rr0r5 - avatar