I still don't get it when i tried that it give me an error say invalid syntax.Here my script:
from sys import argv
$ python ex13.py first 2nd 3rd
script, first, second, third = argv
print "This script called.:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
Thank you for answering my question
No. It's not like that. What Renega means with this:
If you execute this:
$ python ex13.py first 2nd 3rd
You should see this:
is not for the script. It's a Linux terminal command.
![BDnwKwD.png](http://i.imgur.com/BDnwKwD.png)
While talking about terminal command on the Internet, people tend to use the $ to indicate that "This is run in the terminal," so what Renega is saying is that you run:
python ex13.py first 2nd 3rd
on the Command Prompt (I guess you're running on Windows).
There's nothing wrong with your original script. What caused the problem is that you didn't give enough arguments for the script to unpack (explained in my first post). Let me explain it with more detail. argv is a list, so when you're unpacking it like this:
script, first, second, third = argv
It's basically just like this:
script, first, second, third = 'ex13.py', '1st', '2nd', '3rd'
Because argv is actually like this:
['ex13.py', '1st', '2nd', '3rd']
And it gets those items from those arguments you pass when you call the script on the Command Prompt:
python ex13.py 1st 2nd 3rd
Try to print argv and you will get what I mean. Is it clear now? :)