Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # function to create random user IDs
- import uuid
- user_ids = []
- AGENCY = 'MSWGCA'
- def createid():
- x = uuid.uuid4()
- y = list(str(x))
- id = ''
- for i in range(8):
- id = id + y[i]
- new_id = AGENCY + '/' + id
- if new_id not in user_ids:
- user_ids.append(new_id)
- print(new_id)
- else:
- createid()
- createid()
Add Comment
Please, Sign In to add comment