On Macs and Linux I can still use the bc command instead (it’s an old Unix command) but it’s far less handy than Python. See the bc man page.
There’s also dc, the even less used, reverse Polish notation calculator. It is a standard Unix command that predates bc.
Interestingly, the dc “language” is older than C, Awk, Perl, or any other programming language still found on Unix systems. It is implemented in C’s predecessor, the language B.
You can tell that bc and dc are early Unix commands from their names, many of the oldest Unix commands are just two characters long.