> If you want lexical scoping […], you have to ask for it in Perl.
That's false. Lexical scoping was added in 1994. One cannot ask for it, it's always "on".
> Python has safer defaults.
The parable of the mote and the beam is very opportune here. The Python defaults do not amount to much.
Python has neither strict variables (demo: https://stackoverflow.com/a/34071474) nor lexical scope (demo below). That makes it quite unsafe to program, similar to shell: a simple typo silently causes wrong results instead of being shown as error. The safe features cannot be simply enabled, the usual work-around is to use a programming language that implements these features and compiles down to Python.
----
Demo of lack of lexical scope:
$ python3.8 -c 'for i in range(1,4):
print(i)
print(i)'
1
2
3
3
The variable leaks out.
Compare JS (run-time error):
$ node15 -e '[1,2,3].forEach(i => console.log(i)); console.log(i)'
1
2
3
ReferenceError: i is not defined
Compare Perl (compile-time error):
$ perl -Mv5.32 -E 'for my $i (1..3) { say $i; } say $i;'
Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at -e line 1.
Execution of -e aborted due to compilation errors.