The title says it all. Is there a way so I input
input("")
They input
dbs -U thebos123 -P pw.txt
Then store thebos123 into a variable but not the rest
The title says it all. Is there a way so I input
input("")
They input
dbs -U thebos123 -P pw.txt
Then store thebos123 into a variable but not the rest
If it's always the third word, you can get it this way.
line = raw_input("Some input please: ") # or `input("Some...` in python 3
splitline = line.split(" ");
var = splitline[2]
print var
Test
python pyprog.py
Some input please: dbs -U thebos123 -P pw.txt
thebos123