first with the gene name eg: ATK1
item = 'ATK1'
animal = 'Homo sapien'
search_string = item+"[Gene] AND "+animal+"[Organism] AND mRNA[Filter] AND RefSeq[Filter]"
Now we have a search string to seach for ids
handle = Entrez.esearch(db="nucleotide", term=search_string)
record = Entrez.read(handleA)
ids = record['IdList']
this returns ids as a list if and if no id found it's []. Now lets assume it return 1 item in the list.
seq_id = ids[0] #you must implement an if to deal with <0 or >1 cases
handle = Entrez.efetch(db="nucleotide", id=seq_id, rettype="fasta", retmode="text")
record = handleA.read()
this will give you a fasta string which you can save to a file
out_handle = open('myfasta.fasta', 'w')
out_handle.write(record.rstrip('\n'))