How to open all .txt files?

Report a typo

Imagine you have a folder with files in it. Some of them have the txt extension, and others have the HTML extension. Write a program that allows you to find the ones which have the txt-extension. Sort them in alphabetical order and print the final list.

You can use the sorted(your_list_name) function for sorting. Consider that you are already inside the directory.

Tip: Which wildcard allows you to match 0 or more characters?

Write a program in Python 3
import glob
___

Create a free account to access the full topic