title: Add a definition into a command in python
body: <p>I have c is a definition (code below). How can I add it to a command to run in python? Thank you.</p>
  <pre><code>text_file = open(&quot;lastline.txt&quot;, &quot;w&quot;)
  n = text_file.write(last_line)
  text_file.close()
  
  with open('lastline.txt', 'r') as f: 
        c = f.read(12)
  print(&quot;Detected disk identifier as&quot;, c)
  os.system(&quot;diskutil unmount c&quot;)
  </code></pre>