FASTA files are plain text files - they simply don't end in
.txt for reasons of naming convention. It is likely that renaming a file or copying it into something that ends in
.fas would do the trick.
If your text file is in some sequence format other than FASTA - it could be, because most of them are plain text files as well - it would help if you show the first few lines of the file and tell us what is it that you tried in BioPython that didn't work.