Assuming:
def myfunc(x):
my_list = []
list.append(x)
is there a keyword to stop a variable(my_list) from being reassigned? Let\'s supp
You can declare the variable globally as in C/C++ and use global keyword in python to refer them as variable in global data section. Some of references about them:
https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python
http://www.geeksforgeeks.org/global-local-variables-python/
Use of "global" keyword in Python