I am trying to get the number of the files in a certain directory, but I want it to count only text file because I have another directory in the accounts and DS. Store file. What should I modify to only get the number of text files?
list = os.listdir("data/accounts/")
number_files = len(list)
print(number_files)