Excellent examples @Larz60+ and @Gribouillis. Thank you.
Whether you are modifying a global variable or a class variable or a local variable you always have to know what your are doing and certain constructions don't mix in Python:
Whether you are modifying a global variable or a class variable or a local variable you always have to know what your are doing and certain constructions don't mix in Python:
s = 'Hello' s = s + '3' #Works OK - concatenating two strings s = s + 3 #Traceback error - mixing a string and an integerLewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00