Aug-01-2018, 11:24 AM
(Aug-01-2018, 11:11 AM)dust Wrote: No, I'm using Python 3, as already detailed above.if you run the above code with python3 you will get SyntaxError: Missing parentheses in call to 'print'
see
Error:Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print something
File "<stdin>", line 1
print something
^
SyntaxError: Missing parentheses in call to 'print'
(Aug-01-2018, 11:11 AM)dust Wrote: Sorry, where? I can't see that anywhere in the code I listed. Forgive my ignorance but I don't know what you mean by tuples either. Newbie here.
from their code
albums = [('Exodus', 'Andy Hunter', '7/9/2002', 'Sparrow Records', 'CD'), ('Until We Have Faces', 'Red', '2/1/2011', 'Essential Records', 'CD'), ('The End is Where We Begin', 'Thousand Foot Krutch', '4/17/2012', 'TFKmusic', 'CD'), ('The Good Life', 'Trip Lee', '4/10/2012', 'Reach Records', 'CD')] cursor.executemany("INSERT INTO albums VALUES (?,?,?,?,?)", albums)albums is list of tuples. as you can see they supply it to cursor.executemany() method
(Aug-01-2018, 11:11 AM)dust Wrote: There wasn't any traceback, just a popup window stating "Syntax Error", as I already said. I can't cut/paste something that doesn't exist.
in this code there is nothing that will pop-up. All error messages will be printed to the terminal/command prompt. In your original post you have example of traceback you get. We need the same thing for this SynatxError
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