Aug-31-2018, 11:32 AM
in perfringo's code you have
0 and 1 refer to index of each element, i.e. pair[0] is 'B' and pair[1] is 'C'.
Compare it to my code where I used col1, and col2 to unpack the tuple directly in two variables, instead of using one variable that is container and use index to access its elements
for pair in colsin each iteration pair will be 2-elemt tuple, e.g. ('B', 'C')
0 and 1 refer to index of each element, i.e. pair[0] is 'B' and pair[1] is 'C'.
Compare it to my code where I used col1, and col2 to unpack the tuple directly in two variables, instead of using one variable that is container and use index to access its elements
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs