In python, you need to tell the interpreter that the statement continues on the next line.
Add a
\
at the end of a line to continue the statement on the next line. In your case:
cur.execute('''CREATE TABLE IF NOT EXISTS libbooks (id INTEGER PRIMARY KEY, MTy text, Ref text, Title text, \
Fna text, Sna text, Adr1 text, Adr2 text, Pcd text, MNo text, BkID text, BkT text, Atr text, \
DBo text, Ddu text, sPr text, Lrf text, Dod text, DonL text''')
Let us know how it works out.
CLICK HERE to find out more related problems solutions.