I would argue that Python is closer to Scheme than Common Lisp is.
I would argue that Python is closer to Scheme than Common Lisp is.
Even in Common Lisp, the names typically used are “first” and “rest”, not “car” and “cdr”
Also, it's a style error to use FIRST and REST when one operates on cons cells, because those imply a different meaning - that one operates on lists. Sure, the language doesn't care whether you use CAR or FIRST, but the programmer does - and they might know that you treat a cons cell as a pair unto its own, rather than an element of a linked list.
Almost any language has convenient ways to get the first element of a sequence, and all but the first, even C, this is not unusual at all to lisps.
When was the last time you saw recursion on list[0] and list[1:] in a production Python program, or even a tutorial?
That's because lists are mutable in Python.
Do it on tuples and they retrieve and do not copy.
Of course in C, one can simply do `ptr[0]` or `ptr+1` which also only retrieves.
> When was the last time you saw recursion on list[0] and list[1:] in a production Python program, or even a tutorial?
That is purely a difference of culture, not of what the language facilities, both Scheme and Python allow either style.
Lists are not mutable in Clojure, they are “technically mutable” in R6RS Scheme, but it requires opening up a specific module that many Scheme implementations do not even provide unless compiled with specific flags.