I have a list of strings like the following:
mylist = ['a', 'b', 'c', 'aa', 'bb', 'cc', 'aaa', 'bbb', 'ccc', 'aaaa', 'bbbb', 'cccc']
And I need to extract only the strings with k=4 characters, so the output would be:
minlist = ['aaaa', 'bbbb', 'cccc']
How can be implemented efficiently ?