Using regex to split list of strings into list of lists based on starting character

Multi tool use


Using regex to split list of strings into list of lists based on starting character
I have a very long list of 9000+ elements. For example Sample is below:
lst = ['0sbsd uu', '7fsfss us', 'Bsfsd ll', 'Zufss dl', 'fasfs ff', '8fsdr2 us', 'It fss', 'Fsffsfds f']
I have to split lst
into a list of 15 "almost" equal size sublists such that each sublist contains all the entries starting with a given character range (say 0 - c, d - h, ....
).
lst
0 - c, d - h, ....
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.