I am trying to learn to program. I need help to loop users from the login.txt file into this subprocess. any help would be appreciated.
with open("login.txt",'r') as file:
#reading each line
for line in file:
#reading each word
for word in line.split():
subprocess.run(['useradd',input=word , shell=True])
cat login.txt
test01
test02
test03
test04
getting this error: File "loginscript.py", line 11 subprocess.run(['useradd',input=word , shell=True ]) ^ SyntaxError: invalid syntax