To save the output of other language code in Bash, the example is as follows:
$ result=$(python3 -c "print(10+15)")
In the preceding example code, we have embedded python3 code in bash shell. The output of the print command which addition of two numbers will be stored in a bash variable result.
If we want to print the output of embedded language code directly on screen, then the example code is as follows:
$ python3 -c "print(Hello World)"