What is wrong with this code :( | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

What is wrong with this code :(

my_list = ['Mary', 'had', 'a', 'little', 'lamb'] def my_list(my_list): del my_list[3] my_list[3] = 'ram' print(my_list(my_list))

27th Sep 2021, 11:18 PM
Jenkins
2 Respuestas
+ 5
you cant have a function name the same as a parameter https://code.sololearn.com/cRtT6wFHD92D/?ref=app
27th Sep 2021, 11:27 PM
Slick
Slick - avatar
+ 1
my_list = ['Mary', 'had', 'a', 'little', 'lamb'] def mylist(my_list): del my_list[3] my_list[3] = 'ram' return my_list print(mylist(my_list))
28th Sep 2021, 1:39 AM
Solo
Solo - avatar