title: Generating Json file with custom variables Python
body: <p>I'm trying to generate a json file preset with variables that are received from the user from input().The only method I found sorta-similar to mine is <a href="https://stackoverflow.com/questions/13607765/format-python-output-to-json">here</a>, but it doesnt show how to generate a new json file.</p>
  
  <p>An example of inputs:</p>
  
  <pre><code>Enter the name of the json file:
  &gt;&gt;&gt;file
  
  Enter the width:
  &gt;&gt;&gt;2
  
  Enter the height:
  &gt;&gt;&gt;2
  </code></pre>
  
  <p>Then these inputs are converted into a json file like so:</p>
  
  <pre><code>{
      "width": "2",
      "height": "2"
      "column": [
          {
              "0": "1255255255"
              "1": "1255255255"
          },
          {
              "0": "1255255255"
              "1": "1255255255"
          }
      ]
  }
  </code></pre>
  
  <p>Every list of values correspond to a column, and the values within a list are a row. How would I generate enough columns and rows to match the width and height?</p>
  
  <p>i.e.
  a column:</p>
  
  <pre><code>        {
              "0": "1255255255"
              "1": "1255255255"
          }
  </code></pre>
  
  <p>a row:</p>
  
  <pre><code>            "0": "1255255255"
  </code></pre>
  
  <p>the "1255255255" value doesnt matter, it's just a placeholder.</p>