<div><h4id="sends11tocalculatorandcapturesitsoutput">Sends '1 + 1' to calculator and captures its output:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-meta">>>></span><spanclass="hljs-keyword">from</span> subprocess <spanclass="hljs-keyword">import</span> run
<div><h4id="sendstestintocalculatorrunninginstandardmodeandsavesitsoutputtotestout">Sends 'test.in' to calculator running in standard mode and saves its output to 'test.out':</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-meta">>>></span><spanclass="hljs-keyword">from</span> shlex <spanclass="hljs-keyword">import</span> split
<div><h2id="json"><ahref="#json"name="json">#</a>JSON</h2><p><strong>Text file format for storing collections of strings and numbers.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> json
<div><h2id="json"><ahref="#json"name="json">#</a>JSON</h2><p><strong>Text file format for storing collections of strings and numbers.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> json
xxxxxxxxxx