Advertisement
KodingKid

Two ways of creating Python dictionaries (JSON and normal python)

Apr 2nd, 2021
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. #the two ways of creating python dictionaries - found here: link 1 - https://pastebin.com/hxCDvCpx + link 2 - https://pastebin.com/bf6VBk4X
  2. #link 1 = json
  3. #link 2 = normal
  4. dict1 = {
  5.   "brand": "FIAT",
  6.   "model": 500,
  7.   "year": 1957-1975,
  8.   "amount": 3,893,294
  9. }
  10. print(dict1)
  11. #normal python - link 2
  12. import json
  13. x = '{"first_name":"Jack", "last_name":"Jonas"}'
  14. y = '{"first_name":"James", "last_name":"Johnson"}'
  15. z = '{"first_name":"Jude", "last_name":"Jonathon"}'
  16. #json python - link 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement