利用Python的uuid
模块生成16位的16进制数
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import uuid
for i in range(100):
res = str(uuid.uuid4())
res = res.replace('-', '')
print(res[:16])
随机生成100个16位的16进制数:
e77ddca3bb474c9d
fb96d68a32754500
2c5dc4347fcd43c0
b51bffd0bdf74cb6
27a853d2d7064dfb
8a7dc16f4690472f
de43a68e4d184aa3
86f1fda459fa47c7
d91419add64f471f
c18eea9cbe12489e
2cb94f36b9fe4c38
ef0f50cc5f0c4cba
073629d526274def
09ee8260f8de41a4
................................