Sometimes trying to keep a post short and to the point raises other questions. Clearly, my Python-MySQL Program post over the weekend did raise a question. They were extending the query example and encountered this error:
TypeError: range() integer end argument expected, got tuple. |
That should be a straight forward error message because of two
things. First, the Python built-in range()
function
manages a range of numbers. Second, the row returned from a
cursor is actually a tuple (from relational algebra), and it may
contain non-numeric data like strings and dates.
The reader was trying to dynamically navigate the number of columns in a row by using the …
[Read more]