> I'm writing an application which will hold a database of people. Ofcourse, > people can have the same name, so I want to stock them with an unique ID. >
If you're using an actual database rather than a plain old text file, you can let the database do the work for you. Most flavors (sqlite, postgresql, mysql, oracle) have an autoincrement option that will generate unique IDs for you when you insert new records. Below are the docs for sqlite that explain the feature: http://www.sqlite.org/autoinc.html _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor