Key Word(s): Databases, SQL



Exercise 1

An Exercise

Read data from the candidates.txt file and enter it into the candidates table that you just created.

Deliverable: L21-E1.py.

Hints:

  • Copy the necessary set-up from the cells in this lecture.
  • Be careful not to copy blindly! You will get an error if you do.
  • To skip the header you can use the next() method.
  • You will need to do a little processing on the input to split along the | characters.