title: getting a gene sequence from entrez using biopython
body: <p>This is what I want to do. 
  I have a list of gene names for example: [ITGB1, RELA, NFKBIA]</p>
  
  <p>Looking up the help in biopython and tutorial for API for entrez I came up with this:</p>
  
  <pre><code>x = ['ITGB1', 'RELA', 'NFKBIA']
  for item in x:
      handle = Entrez.efetch(db="nucleotide", id=item ,rettype="gb")
      record = handle.read()
      out_handle = open('genes/'+item+'.xml', 'w') #to create a file with gene name
      out_handle.write(record)
      out_handle.close
  </code></pre>
  
  <p>But this keeps erroring out. I have discovered that if the id is a numerical id (although you have to make it in to a string to use, '186972394' so:</p>
  
  <pre><code>handle = Entrez.efetch(db="nucleotide", id='186972394' ,rettype="gb")
  </code></pre>
  
  <p>This gets me the info I want which includes the sequence.</p>
  
  <p><strong>So now to the Question:</strong>
  How can I search gene names (cause I do not have id numbers) or easily convert my gene names to ids to get the sequences for the gene list I have. </p>
  
  <p>Thank you,</p>