Could someone please explain the concept of having a comma delimited chain (probably not the correct terminology, but I didn't want to confuse it with list) of variable names on the left side of the assignment operator?
What I'm referring to would be something of the following nature
reader = csv.reader(open('some_file', 'rb'))
for row in reader:
k, v = row
myDictionary[k] = v
I know that example might lead to the question of the format of 'some_file', so here is another example I've come across
username, password = sys.argv[1:]
I understand that argv comes from the command line, and 1: refers to all arguments after the python script name, but how do username and password get the correct items? In other words, what delimits the arguments passed into this program, is it just the space between the arguments?
In reference to the first example, how do k and v get their values from row, assuming row is a two column line. Do those use the comma as the delimiter?
Any explanation and/or links to Python code or documentation would be great.