I have a python function that generates random string using the random library and assigns it to a variable in python I want to use that in `os.system` command as in

```
os.system("mysql -u root --password=variable here < /tmp/db.setup")

```

How to achieve this?