I can't answer in the case of Python or any such “natural” programming language, but let me show that whenever $\#\Sigma \geq 2$ there is an encoding such that the function you define is non-computable.
The programming language in question has two “modes”, determined by a different program syntax: in “compute” mode it is a normal programming language, whereas in “proof” mode, it can only output a string (independently of its input) if that string is a theorem of first-order ZFC, and this behavior is obtained by giving a full proof of that theorem as program. The only thing we need to add is the requirement that no “compute mode” program is a substring of a “proof mode” program, say, by requiring that compute mode programs start with a special symbol that is not part of proof mode.
To be more precise, here's a possible way of doing it: say $\Sigma = \{C,P\}$. A valid program is either a nonempty sequence of $C$'s, in which case it encodes the $e$-th general recursive function where $e$ is the length of the string, or a sequence of $P$'s, in which case if $n$ is its length, then $n$ must be the Gödel encoding of a valid proof in ZFC, and the output of the program is the constant function with value the conclusion of that proof. Anything else is considered invalid (and behaves as the totally undefined function).
Clearly this programming language is convertible to and from Turing machines: to compute from Turing machines, just use compute mode in every case. To compute to Turing machines, compute mode is standard, and for proof mode, just check that the program is a valid proof and output its conclusion.
Now given a string $s$, if $s$ is a theorem of ZFC, there will be a “proof mode” program that outputs it, namely a proof of $s$. The first proof of $s$ is an irreducible program in the sense you defined (since substrings of the program can only code valid “proof mode” programs). There will, of course, be a “compute mode” program which does the same, but no matter: to bound the maximal length of a program which outputs $s$ we need to bound the length of the first proof of $s$, and this is clearly not possible by a computable function. (If you prefer, use the Busy Beaver instead of this, by demanding that the program be a complete execution trace of whatever string you're trying to output.)