I have tried this:
ListFiles = list(os.walk(os.getcwd()))
SplitTypes = []
for i in range ( 0 , len(ListFiles) ):
SplitTypes.extend(ListFiles[i].rsplit( "." ) [1])
print(SplitTypes)
but the result I got is this:
['p', 'y', 't', 'x', 't', '3', '2', ' ', 'p', 'm', '4', '0', '1', '2', '2', '4', '1', '4', 's', 'k', 'p', 'm', 'p', '4']
which the numbers are because of the screenshots I had in that directory and the time is separated by '.' and they are separated individually.
I want the result to display:
['py', 'txt', 'skp', 'png']
or something similar to that.
and also this file name 'Screen Shot 2017-05-24 at 11.24.33 am.png' should only show the png bit. After this I will use set() to remove the duplicates.