Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 9 years ago

Need help on python programming?

I am doing a tutorial and i am stuck. I even copied what he wrote and I can't get the same results..

#The script

from sys import argv

script, first, second, third = argv

print "The script is called:", script

print "Your first variable is:", first

print "Your second variable is:", second

print "Your third variable is:", third

#The results

$ python ex13.py first 2nd 3rd

The script is called: ex13.py

Your first variable is: first

Your second variable is: 2nd

Your third variable is: 3rd

I just get an error saying i have to have more than one value, but i don't know how to add the value.

I tried one thing where i only left script and took out first, second and third.

-That printed out the file name...but I don't understand how to make the first, second, third work.

Thank you or any help:)

Update:

http://learnpythonthehardway.org/book/ex13.html

-this is where I am learning from.

2 Answers

Relevance
Still have questions? Get your answers by asking now.