我有一个字符串列表。根据每个字符串的长度,我需要将它们分组到一个列表中。最终,一个列表应该包含所有的列表。
示例:
输入
in=['the', 'way', 'you', 'see', 'people', 'is', 'the', 'way', 'you', 'treat', 'them', 'and', 'the', 'way', 'you', 'treat', 'them', 'is', 'what', 'they', 'become']
输出
expected_out=[['is'],['and', 'see', 'the', 'way', 'you'], ['them', 'they', 'what'], ['treat'], ['become', 'people']]