How to insert multiple rows in SQLite Dbase
Miki
miki.tebeka at gmail.com
Tue Apr 1 08:36:59 EDT 2008
> Thanks regards to your suggestion, but I don't understand why we have
> to put the IF statement?
It's just an example, one possible implementation could be:
def parse_data(data):
mapping = {}
for line in data.splitlines():
if not line.strip():
continue
key, value = line.split(":", 1)
mapping[key] = value
return mapping
HTH,
--
Miki <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com
More information about the Python-list
mailing list