Python an Lua are both script languages, which means they can be used to write plugin scripts. I don't think they're particularly good for defining data, though (although Lua is better than C in that regard, which doesn't say much).
The RAW format, in contrast is data only, for which there are things like XML and JSON (with XML having Schemas, i.e. a way to define what the legal format of the data looks like, and thus a way to automatically verify that the data provided actually matches the format, as well as generation of code to parse the data [but you'd still have to "translate" that into the program's internal data representation manually]).
The nutjob who created JSON threw out the baby with the bath water when removing the support for comments in a rage fit over someone "abusing" comments for processing directives, according to the explanation I've heard, so comments are out, unless you disguise them as data...
DFHack defines the DF structures using XML and supports scripts written in Lua (the script most frequently used. There's additional support). I don't know whether those choices would be the same today, however.
Note that none of the above should be seen as recommendations. There may very well be more suitable candidates for both scripting and data definition, but you should use something suitable for your purpose, not something that's widely use for other purposes.