never copy and paste the python script. HAND type it. its not that big and it wont take that long.
Now that you said this, I noticed on your original post that you had something like “shutdown -h now” but those quotes aren't recognized as quote by the RPi. They need to be ASCII quotes like this "shutdown -h now" so when you retyped it by hand you actually fixed these quotes!
We just talked about this the other day.
I'm sure there are some ppl just <sighing> about this and think that its silly that I got these confused
I wouldn't worry about that and most of the ppl on this forum are here to help and to learn. Hopefully someone else finds this and it helps them resolve their wrong use of quotation dilemmas lol.