What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-27 21:07:02
Is Python call by reference or call by value
If the object is mutable, the object will change. eg: def my_func(my_list): my_list.append(5) print("List printed inside the function: ",my_list) numberlist = [1,2,3] my_func(numberlist) # numberlist here changed since list is mu... Add solution -
Python 2021-09-25 03:10:05
python string assignment by index
# Strings are immutable in python, so you cannot insert characters. # You could do convert it to a list however: text = "Hello Warld" text = list(text) text[7] = "o" text = "".join(text) >>>text "Hello Wor... Add solution
Best helpers
Ranking is empty