You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python3
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license"for more information.
>>> import uuid
>>> # make a random UUID
>>> # 基于伪随机数生成,有可能重复,重复概率极低。
>>> uuid.uuid4()
UUID('16fd2706-8baf-433b-82eb-8c7fada847da')
参考:
实例一:Python 使用 UUID 库生成随机 ID
UUID是如何保证唯一性的
UUID (uuid4)重复概率:
实例二:Django 为用户生成 UUID
参考:
The text was updated successfully, but these errors were encountered: