title: python3 -c with long cmd string: Trying to resolve invalid syntax
body: <p>I know it would be easier if I put a long python script within a file, but I am trying to resolve why I am having a syntax error when within a <code>python3 -c cmd</code>:</p>
  
  <p>FYI: If it matters, I am performing this on OS X.</p>
  
  <p>I read the following, but it did not resolve my problem:
  <a href="https://stackoverflow.com/questions/33368897/python-multiline-command-running-from-bash">python multiline command running from bash</a></p>
  
  <p>This is the working python3 script if executed from within a file:</p>
  
  <pre><code>import csv
  
  with open('tmp/google_adwords_report.csv', 'r') as csvfile:
      csvfile.seek(0)
      next(csvfile)
      readCSV = csv.DictReader(csvfile)
      for row in readCSV:
          print(row)
  </code></pre>
  
  <p>And this is the same script if performed within command line <code>python3 -c cmd</code>:</p>
  
  <pre><code>$ python3 -c "import csv;  with open('tmp/google_adwords_report.csv', 'r') as csvfile: csvfile.seek(0); next(csvfile);  readCSV = csv.DictReader(csvfile); for row in readCSV: print(row);"
  
    File "&lt;string&gt;", line 1
      import csv;  with open('tmp/google_adwords_report.csv', 'r') as csvfile: csvfile.seek(0); next(csvfile);  readCSV = csv.DictReader(csvfile); for row in readCSV: print(row);
                      ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Thanks</p>