pyodbc error: missing parenthesis in call to print

pyodbc error: missing parenthesis in call to print

请告知我的代码出了什么问题:

我正在尝试连接到 odbc 并检索数据,但我失败了

conn = po.connect(
                DRIVER='{iSeries Access ODBC Driver}',
                SYSTEM = AS400,                
                DBQ = DBQ,
                DFTPKGLIB= 'QGPL',
                LANGUAGEID='ENU',
                PKG = 'QGPL/DEFAULT(IBM)',
                UID=UID,
                PWD=PWD)

cursor = conn.cursor()
cursor.execute("SELECT mmnmbtp.FXCLN FROM mmnmbtp")
for row in cursor.fetchall():
    print row

我收到以下错误:

File "<ipython-input-17-c2fd1d8f7233>", line 52
    print row
            ^
SyntaxError: Missing parentheses in call to 'print'

如果您使用的是 python 版本 3.x,则显示 print row 的行应该改为 print(row)