I do get the solution but still it says that the code is wrong and doesn't give the desired output


#1

def main():
my_list = [[‘a’, ‘b’], [‘cc’, ‘dd’, [‘eee’, ‘fff’]], [‘g’, ‘h’]]

# insert a new list [1, 2, 3] at the end of my_list
my_list.extend([1,2,3])# Your code goes here

print(my_list)

# Delete 'eee' from the list
my_list[1][2].pop(0)# Your code goes here

print(my_list)
return 0

if name == ‘main’:
main()


#2

use
my_list.extend([[1,2,3]])


#3

simply use append instead of extend. my_list.append([1, 2, 3])
otherwise my_list.extend([[1, 2, 3]])

As append adds an element to the end of the list, but extend extends the current list to include the elements from the new list. Read the Description above for more details.