Q:

Errno 22 Invalid argument...python3.exe: can't open file print.py

I have these two scripts within the same folder, I'm working in Windows 10:
File job.sh
python3 print.py

File print.py
#!/usr/bin/python3
print('Hello World')

When I run job.sh I get the error, 
[Errno 22] Invalid argument7-32\python3.exe can't open file print.py
But, after a lot of ways that I tried, I just noticed that only the first line is generating this error. So, If I modify the file job.sh
python3 print.py
python3 print.py

then the first line is generating the same error, whereas the second is showing the result. 
Btw, if I write directly in cmd python3 print.py everything is fine.
I have no idea what is wrong with my job.sh script. Thanks for any help!

A:

These are some tips:

don't use directly python3 to launch your python script, because it is already defining to be a python3 executable
ensure it is executable
like said in comments, don't use print as it is already an important keyword
ensure you don't have wrong/bad ending like character (\r\n instead of \n)

Finally (let's call it myScript.py instead of print.py):
dos2unix job.sh
chmod +x myScript.py

And in your job.sh bash script, just call your now executable python script:
myScript.py

