Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23305

Can a constant be user obtained via user input if it stays constant the duration of the program execution?

$
0
0

I am making a maze generator in python(pygame) and want to get the size of the maze from the user. Can I assign this value to a "variable" in the constants module since it will stay this way until the program is done running?

Since I am unaware of any const keyword like in c/c++ I'm sure this would work regardless but I am asking in the context of best coding practice. Thanks!


Viewing all articles
Browse latest Browse all 23305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>