版本相關資訊:
System version : Windows 10 64-bit
Python version : Python 3.6.0 :: Anaconda 4.3.1 (64-bit)
Codes:
import uuid
uuid1 = uuid.uuid4()
uuid2_str = str(uuid.uuid4())
print(uuid1)
print(type(uuid1))
print('-'*38)
print(uuid2_str)
print(type(uuid2_str))
結果:
562e06e3-4d0b-405d-bc51-d4011a3f0c52
<class uuid.uuid="">
--------------------------------------
2f46634d-69ef-45b7-833a-3bb528c2ae95
<class str="">
沒有留言:
張貼留言