Scripts in PAD only accept strings as inputs. Your list is not actually interpreted as a list by your Python script. It would be better to join it using Join text in your flow, pass it in as a string and then split it into list in the Python script itself.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.