title: CS50 PSET6 - DNA - Works fine on SMALL but not for LARGE database
body: <p>I'm taking CS50 and got stuck on this pset6.</p>
  <p>I made this code and it's working fine for 'small' given database.
  On 'large' one i get wrong values in my DNA sequence.
  Like, using debug50 i got that Albus sequence should be 15,49,38... and my seq is 21, 55, 64...</p>
  <p>whats wrong? AND why it works fine on small database and not in large one?</p>
  <p>Thanks for the help!</p>
  <pre><code># Import ARGV and CSV library
  from sys import argv, exit
  import pandas as pd
  import csv
  
  # Check if argv has 3 arguments (program name, cvs file and dna sequence)
  while True:
      if len(argv) != 3:
          print(&quot;Usage: python dna.py data.csv sequence.txt&quot;)
          exit(1)
      else:
          break
  
  with open(argv[2], 'r', encoding=&quot;UTF-8&quot;) as txt:
      dna_seq = txt.read()
  #Find the number of STR - AGATC,TTTTTTCT,AATG,TCTAG,GATA,TATC,GAAA,TCTG
  AGATC = dna_seq.count(&quot;AGATC&quot;)
  TTTTTTCT = dna_seq.count(&quot;TTTTTTCT&quot;)
  AATG = dna_seq.count(&quot;AATG&quot;)
  TCTAG = dna_seq.count(&quot;TCTAG&quot;)
  GATA = dna_seq.count(&quot;GATA&quot;)
  TATC = dna_seq.count(&quot;TATC&quot;)
  GAAA = dna_seq.count(&quot;GAAA&quot;)
  TCTG = dna_seq.count(&quot;TCTG&quot;)
  
  name = 0
  if argv[1] == &quot;databases/small.csv&quot;:
  
      with open(argv[1], 'r') as csv_file:
          reader = csv.DictReader(csv_file)
          for row in reader:
              dna_db = row['name'], row['AGATC'], row['AATG'], row['TATC']
              dna_db = list(dna_db)
  
              seq = [AGATC, AATG, TATC]
              seq = [str(x) for x in seq]
  
              if dna_db[1:4] == seq:
                  name = dna_db[:1]
                  break
              else:
                  name = &quot;No match&quot;
  
  elif argv[1] == &quot;databases/large.csv&quot;:
  
      with open(argv[1], 'r') as csv_file:
          reader = csv.DictReader(csv_file)
          for row in reader:
              dna_db = row['name'], row['AGATC'], row['TTTTTTCT'], row['AATG'], row['TCTAG'], 
  row['GATA'], row['TATC'], row['GAAA'], row['TCTG']
              dna_db = list(dna_db)
  
              seq = [AGATC,TTTTTTCT,AATG,TCTAG,GATA,TATC,GAAA,TCTG]
              seq = [str(x) for x in seq]
  
              if dna_db[1:9] == seq:
                  name = dna_db[:1]
                  break
              else:
                  name = &quot;No match&quot;
  
  print(name)
  </code></pre>