diff --git a/gff3/gff3.py b/gff3/gff3.py
index <HASH>..<HASH> 100644
--- a/gff3/gff3.py
+++ b/gff3/gff3.py
@@ -47,7 +47,7 @@ CODON_TABLE = dict(zip(CODONS, AMINO_ACIDS))
 def translate(seq):
     seq = seq.lower().replace('\n', '').replace(' ', '')
     peptide = ''
-    for i in xrange(0, len(seq), 3):
+    for i in range(0, len(seq), 3):
         codon = seq[i: i+3]
         amino_acid = CODON_TABLE.get(codon, '!')
         if amino_acid != '!': # end of seq
remove xrange to make it compatible to Python 3