FASTA-to-tsv conversion script
Welcome to Code Review!
I'll add to the other answer from Reinderien.
PEP-8
In python, it is common (and recommended) to follow the PEP-8 style guide for writing clean, maintainable and consistent code.
Functions and variables should be named in a lower_snake_case, classes as UpperCamelCase, and constants as UPPER_SNAKE_CASE.
No unnecessary whitespaces are needed around the arguments when defining or calling a function. This applies for referring array/list elements as well.
Functions
Split your code into individual smaller functions, doing singular tasks. A few examples would be, reading/parsing the fasta files, validating sequence of gene, counting occurrences (try collections.Counter package to do this).
CSV/TSV
Python comes with inbuilt package csv which can also be used to write tsv files. You do not need to modify/write each line yourself.
Glob searching for files
Python 3+ has another inbuilt package pathlib, which supports getting all files using a glob pattern. You would again, not need to manually (metaphorically) aggregate all the files with .fa or .fasta extensions.
if __name__ block
For scripts, it is a good practice to put your executable feature inside the if __name__ == &quot;__main__&quot; clause.