Change hardcoded values in python 3
问题 I would like to change hardcoded values in my code. I would like the code to replace and change hardcoded values based on the number of times it runs. Beginning with: x=1 The next time, after I run it, in the code itself, I would like to see in the code editor: x=2 It will automatically change the values of the code without human input, so the third time its run: x=3 And this is all done just by the script running, no human interaction whatsoever. Is there an easy way? 回答1: You can simply