Question: how to create a postgres database using python?
Answer: # import the PostgreSQL client for Python. import psycopg2. ... 
# Connect to PostgreSQL DBMS. con = psycopg2.connect("user=test password='test'"); ... 
# Obtain a DB Cursor. cursor = con.cursor(); ... 
sqlCreateDatabase = "create database "+name_Database+";" # Create a table in PostgreSQL database.