[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Ideas about storing questions/answers for a boardGame.



"marta sanz" <p22sacam@xxxxxx> asked:

> Does anyone have any idea on how can I store
> the questions and answers? I thought about a text file with a
> question per line,but don't know if it is a good idea...

A text file is a good start, but I'd go one step further and use an XML
file. XML is a text file format that has good support within Python.

I particularly like the ElementTree API:
http://docs.python.org/lib/module-xml.etree.ElementTree.html

-Dave LeCompte