I want to replicate the following bash export command in Python:
export my_shell=$SHELL
If I execute the above command in bash and echo after that:
echo $my_shell
/bin/bash
How do this in Python? I know we can use export command (which does not use environment variable) using os.environ() like following:
import os
os.environ['my_shell'] = "my_shell_string"
but how to pass another environment variable (in this case: $SHELL) as an input when exporting like above?