Persistent SyntaxError ("name used prior to global declaration") on macOS M4 with Python 3.9/3.10, even in minimal scripts and new virtual environments, not resolved by typical troubleshooting

Hi Olivier, and welcome to the forums.

The code you posted is presented badly by the forum software. If you follow this advice About the Python Help category it will come out readable.

1 Like