BASH - python hack

Hi there…
it seems that we can execute python while selecting bash language…
this is not regular is’nt it ?

cat - | python -c '
import sys, math
bestTemp = 10
print bestTemp
'

Mixing up languages is a perfectly normal thing to do in bash, FWIW.

Now if you’re talking about (ab)using that to get a higher score on the temperatures multi, then indeed there’s a good debate to be had there.

But to repeat, composing small pieces of programs using various utilities (typically including sed, awk, perl) is absolutely idiomatic bash programming.

Mixing Unix tools ok… but other selectable languages like python or perl don’t make sense to me.
I think about the contests, where are notions like top 10 for each langages… i’m just surprised that it’s possible to solve challenge like FantasticBits calling in bash python version of our algorythm without using any unix tools for example…