Jan-30-2017, 03:44 PM
(Jan-30-2017, 01:51 PM)hsunteik Wrote: The main thing I want to know is how to procedurally create variable name and assign the value to it,please?
Maybe after you answer this question,I can figure out how to solve it myself.
You're not getting an answer to this question because it's a bad question. Python is not set up for procedural creation of variable names. You could do it, but you would have to work against Python to do it. You never want to work against your programming language. If you find yourself doing that, you either need to switch your programming language or switch how you're working.
When you want to do this sort of thing in Python, you should be using a dict. I have a feeling you will next ask how to use a dict to do this. But that's one of the basics people keep telling you that you need to know.
You want to jump to the high level stuff without a foundation in the basics. But then when you try to write a high level application, the application will have a bad foundation because it won't use the basics well. And that will cause problems throughout your application, like the slowness of reading and writing to the hard disk, or constantly fighting against Python to dynamically create variable names.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures