example:
# Suppose id(i) == A
i = 10
if some_condition:
i = 11
# How to make sure this 'i' has an id == A instead of B?
# Because at this time my pycharm prompts me that the i above is not used.
And what should I do when I want to declare a local variable just with the same name without affecting the value of i above?
Or, is there a way to force only assignment without declaring variables in python3, then an exception thrown to prompt developer when the name doesn't exist?
I will be appreciated if anyone offers help.