Strings and % sign fails - Help Please

Jorge Godoy godoy at
Fri Mar 24 03:57:43 CET 2006

siasookhteh at writes:

> The following statement fails because it has the '%' sign in it.
> cursor.execute("select '%'")
> The error is: IndexError: list index out of range
> How do I address this problem?

Use "%%".

Jorge Godoy      <godoy at>

"Quidquid latine dictum sit, altum sonatur."
- Qualquer coisa dita em latim soa profundo.
- Anything said in Latin sounds smart.

More information about the Python-list mailing list