Need to generate random json data in this format by subtracting the values
list=['20','30','50','1','200']
for n in list :
data=
{
"total_members_present":1000
"count": n #(here 20)
"total_members_now":980 #(1000-n ,n =20),
},
{
"total_members_present":980
"count": n #(here 30)
"total_members_now":950 #(1000-n ,n =30),
},
.........
it should continue until the list ends.
Aucun commentaire:
Enregistrer un commentaire