In the oracle web site there is a good tutorial that helped me a lot: Tutorial: Using Python with Oracle Database 11g.
I had to import the cx_Oracle library and I write the follow code:
import cx_Oracle
connection = cx_Oracle.connect('username/password@IP:Port/DatabaseName')
cur = connection.cursor()
cur.execute('my query')
for result in cur:
print(result)
cur.close()
connection.close()