[Solved] Changing string into integers for variables inside function, Python
The variable n inside the function is distinct from the expression (or variable) supplied as an argument. As such, assigning to n inside the function will not affect any of the variables outside. (This is because Python is not Call By Reference.) Instead, use the return value, eg. def classifyInput(n): if n == “r”: return … Read more