dictonary

Daniel Nygård danieln at stud.cs.uit.no
Wed Mar 13 05:20:12 EST 2002


How do I insert a dictionary into a database (_mysql)?

db = _mysql.connect()
string = {
	hello:'wow', 
	something:'nothing',
	nothing : 'something',
	number : 5,
	name : 'daniel'}

then I have a database with the same attributes as the keys in the dict.
above.
How do I insert the whole dict into the database.

thanks

Daniel Nygård



More information about the Python-list mailing list