We're a place where coders share, stay up-to-date and grow their careers.
Hi ! I think there is an error in section "Mutable objects"
color = ["red", "blue", "green"] print(color) ["red", "blue", "green"] color[0] = "pink" color[-1] = "orange" print(color) ["red", "blue", "green", "orange" ]
I think, the final result is : ['pink', 'blue', 'orange']
No ?! :D
Read my words again i mentioned that lists are mutable in python!
No doubt on what you say :) I just tell you : If i write your example line by line, the final result is false :D
Thanks 😊 I've added one photo for better understanding😃
Hi !
I think there is an error in section "Mutable objects"
lists are mutable in python
I think, the final result is :
['pink', 'blue', 'orange']
No ?! :D
Read my words again i mentioned that lists are mutable in python!
No doubt on what you say :)
I just tell you : If i write your example line by line, the final result is false :D
Thanks 😊 I've added one photo for better understanding😃