Feb-05-2017, 06:54 PM
Python won't let you accidentally change a global variable from a function. There is a way to simply modify the global variable, however it's discouraged generally speaking and very heavily on this particular site.
As for what you're really trying to accomplish here... it looks like this is homework. Can you specify the requirements?
As for what you're really trying to accomplish here... it looks like this is homework. Can you specify the requirements?