title: IndexError string index out of range when referencing first character
body: <p>Here is my code (currently):</p>
  
  <pre><code>conn = sqlite3.connect(db)
  conn.text_factory = str  #bugger 8-bit bytestrings
  cur = conn.cursor()
  
  reader = csv.reader(open(csvfile, "rU"), delimiter = '\t')
  for Number, Name, Message, Datetime, Type in reader:
  
  # populate subscriber table
  if str(Number)[0] == '1': # errors on this line
    tmpNumber = str(Number)[1:]
    Number = int(tmpNumber)
  cur.execute('INSERT OR IGNORE INTO subscriber (name, phone_number) VALUES (?,?)', (Name, Number))
  
  cur.close()
  conn.close()
  </code></pre>
  
  <p>It returns this error on the line commented to indicate where the error lies:</p>
  
  <pre><code>IndexError: string index out of range
  </code></pre>
  
  <p>All of the numbers have values, but if the phone number starts with a 1 I want to remove the 1 before inserting it into the database. Why won't this work? I've converted it to a string before trying to reference the first character, so I don't understand why this isn't working.</p>