i wrote the code as below
import mysql.connector
mysql.connector.connect
(host='localhost',database='test2',user='root',password='1234')
and saved the file as databas.py.
When i execute the below code from command prompt i am getting error as shown in command_prompt_error.
But when i execute the same set of commands in python command line link to data base s getting created successfully.(shown in working.png)
please let me know what is the source of the issue


Pythonversion~