Advanced code
import subprocess
# Run a command in the terminal
subprocess.run(["gnome-terminal", "--", "bash", "-c", "echo Hello, World!; exec bash"]) # For GNOME Terminal on Linux
# subprocess.run(["open", "-a", "Terminal", "--args", "echo Hello, World!"]) # For Terminal on macOS
#...