📜  python json 随机数生成器 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:13.598000             🧑  作者: Mango

代码示例1
import json 
from faker import Faker
import random
from random import randint
fake = Faker('en_US')
for _ in range(10):
    my_dict = {    'foo': randint(0, 100),    'bar': {'baz': fake.name(),       'poo': float(random.randrange(155, 389))/100   } }
    print(my_dict)