Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
303 B
1
Indexable
Never
import json
data = []
logins = ['unger', 'hak']
passwords = ['78789826', 'hakpass']

for x, y in zip(logins, passwords):
    data.append({'login': x, 'password': y})

with open('users.json', 'w') as file:
    json.dump(data, file)

with open("users.json") as file:
    data = json.load(file)
print(data)
Leave a Comment