How can I generate a unique ID in Python? [duplicate] October 20, 2022 by Tarik Perhaps uuid.uuid4() might do the job. See uuid for more information.