Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

So you have a value, and you want to associate it with a name. That's what we call a key/value pair, and in Python, you should use a dict (dictionary) to store that.

http://www.developer.com/lang/other/article.php/630721/Learn-to-Program-Using-Python-Getting-Started-with-Dictionaries.htm

I recommend you use JSON format to save it to disk. You can put your key/value pairs into a dict, then save the whole dict to a JSON file. It's easy and reliable.

http://stackoverflow.com/questions/4759634/python-json-tutorialhttps://stackoverflow.com/questions/4759634/python-json-tutorial

So you have a value, and you want to associate it with a name. That's what we call a key/value pair, and in Python, you should use a dict (dictionary) to store that.

http://www.developer.com/lang/other/article.php/630721/Learn-to-Program-Using-Python-Getting-Started-with-Dictionaries.htm

I recommend you use JSON format to save it to disk. You can put your key/value pairs into a dict, then save the whole dict to a JSON file. It's easy and reliable.

http://stackoverflow.com/questions/4759634/python-json-tutorial

So you have a value, and you want to associate it with a name. That's what we call a key/value pair, and in Python, you should use a dict (dictionary) to store that.

http://www.developer.com/lang/other/article.php/630721/Learn-to-Program-Using-Python-Getting-Started-with-Dictionaries.htm

I recommend you use JSON format to save it to disk. You can put your key/value pairs into a dict, then save the whole dict to a JSON file. It's easy and reliable.

https://stackoverflow.com/questions/4759634/python-json-tutorial

Source Link
steveha
  • 77.1k
  • 21
  • 94
  • 119

So you have a value, and you want to associate it with a name. That's what we call a key/value pair, and in Python, you should use a dict (dictionary) to store that.

http://www.developer.com/lang/other/article.php/630721/Learn-to-Program-Using-Python-Getting-Started-with-Dictionaries.htm

I recommend you use JSON format to save it to disk. You can put your key/value pairs into a dict, then save the whole dict to a JSON file. It's easy and reliable.

http://stackoverflow.com/questions/4759634/python-json-tutorial