👨🏼‍💻개발/파이썬

파이썬 - 중복 없는 고유성이 보장되는 id 만들기(uuid)

Janger 2022. 6. 18. 02:18
728x90
import uuid
uuid.uuid4() #uuid4 => full random uuid
# Outputs something like: UUID('0172fc9a-1dac-4414-b88d-6b9a6feb91ea')

 

uuid란 고유성이 보장되는 id를 만들기 위한 표준 규약을 말한다. 

 

출처: 

https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits

 

Random string generation with upper case letters and digits

How do I generate a string of size N, made of numbers and uppercase English letters such as: 6U1S75 4Z4UKK U911K4

stackoverflow.com

 

728x90