title: How do I import a text file into a SQLite3 table using python
body: <p>I currently have a txt file of movies which contain a movieID,Movie Name, and genre.
  Example:</p>
  
  <pre><code>1,Toy Story (1995),Animation|Children's|Comedy
  2,Jumanji (1995),Adventure|Children's|Fantasy
  3,Grumpier Old Men (1995),Comedy|Romance
  4,Waiting to Exhale (1995),Comedy|Drama
  5,Father of the Bride Part II (1995),Comedy
  </code></pre>
  
  <p>I am trying to import this file into a SQLite3 table created with Python:</p>
  
  <pre><code>import sqlite3
  
  conn = sqlite3.connect('CSC 452 Final.db')
  c=conn.cursor()
  </code></pre>
  
  <h1>Drop Tables</h1>
  
  <pre><code>c.execute('''DROP TABLE IF EXISTS temp_movie''')
  print("Table temp_movie dropped.")
  </code></pre>
  
  <h1>Create Table for Movies</h1>
  
  <pre><code>c.execute('''CREATE TABLE temp_movie (
      MovieID          NUMERIC (5),
      movie_title_year VARCHAR2 (255),
      movie_categories VARCHAR2 (255),
      CONSTRAINT movies_movieID_PK PRIMARY KEY (
          MovieID
      ))''')
  print("Table temp_movie successfully created.")
  conn.commit()
  </code></pre>
  
  <p>What's the best way to import my text file into this database with the delimiter being ','?</p>