How do you create a database in python?



How do you create a database in python?..

Answer / Goutam Vikash Mallick

To create a database in Python, you can use libraries such as SQLite3 or SQLAlchemy. Here's an example using SQLite3: `import sqlite3; conn = sqlite3.connect("mydb.db"); c = conn.cursor(); c.execute("CREATE TABLE mytable (a, b)")`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is dataframe in python?

1 Answers  


What are pandas in python?

1 Answers  


What is python metaclass?

1 Answers  


What mode is used for both writing and reading in binary format in file.?

1 Answers  


What does input () do in python?

1 Answers  


Can a constructor be final?

1 Answers  


What is the process of compilation and linking in python?

1 Answers  


Do you know what are python decorators?

1 Answers  


What is dynamic typing in python?

1 Answers  


What is python coded in?

1 Answers  


Who created python?

1 Answers  


How to write a text from from another text file in python ?

1 Answers  


Categories