title: How to return any object with sys.stdout
body: <p>I am working on a python bash script and I would like to output a list from the first file to the next as so:</p>
  
  <h2>sender.py</h2>
  
  <pre><code>#!/usr/bin/env python
  import sys
  l = [1,2,4,6,8,"maybe some text"]
  sys.stdout.write(Qs)
  sys.stdout.flush()
  </code></pre>
  
  <h2>receiver.py</h2>
  
  <pre><code>#!/usr/bin/env python
  import sys
  print(sys.stdin.readline())
  </code></pre>
  
  <h2>then do in bash</h2>
  
  <pre><code>./sender_py | ./receiver
  </code></pre>
  
  <p>I know the problem is that this method can only read in a string, but is there any other way to pass any object. In this case, I am passing a list, but later I would like to try other objects such as pandas dfs.</p>