How to send Python variable to bash variable?
Question: I am trying to use Python to select a variable from a list, then speak it
outloud using the bash command. Right now I have something like this

    
    
    foo = ["a","b","c","d"]
    from random import choice
    x = choice(foo)
    foo.remove(x)
    from os import system
    system('say x')
    

This says "x", what I need is for it to say the value of the `x` variable.


Answer: I suppose you can use `os.system`, but better might be `subprocess`:

    
    
    import subprocess
    subprocess.call(['say',x])
    

