The difference between sys.argv & argv?

python, python-2.7, python-3.x

Solution

They're the same thing, it just depends on how you write the import statement.

import sys

If you write this, then you must reference `sys.argv`.

from sys import argv
from sys import *

If you write either of those, then you can write simply `argv` without the `sys.` qualifier.

Problem

I don't understand the difference between `sys.argv` and just `argv`, Nothing online gives me the concept that I understand. if both are the same! When do we use `sys.argv` and when to use `argv` ? if not what is the `sys.argv`. I've idea what is the `argv`.

Original source

Related problems