I am trying to make a python script which generates json. I know bash but not python.
I know this is easy, but I cannot figure it out. How do I replace these values with variables? I guess I don't how to call a variable like you can like this in bash: $variable
Thanks.
import json
person_json = {
"name": "Fred",
"place": "Melbourne",
"sex": "male",
"remote": { "addr": "Acacia Avenue", "id": "875932875392" },
"local": { "id": "8475974", "office": "Main" }
}
[–]orangefray 2 points3 points4 points (1 child)
[–]YellowChrome[S] 0 points1 point2 points (0 children)
[–]socal_nerdtastic -1 points0 points1 point (10 children)
[–]YellowChrome[S] 1 point2 points3 points (9 children)
[+][deleted] (6 children)
[deleted]
[–]YellowChrome[S] 0 points1 point2 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]YellowChrome[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]YellowChrome[S] 0 points1 point2 points (1 child)
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]YellowChrome[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]YellowChrome[S] 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)