列表python中的组项

时间:2015-12-03 02:38:20

标签: python list grouping

我正在研究一个项目,它涉及很多操作列表。我正在尝试将列表中的对象组合在一起,例如列表:

["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"]

会变成:

["ABCD","EFGH","IJKL","MNOP"]

但我似乎找不到办法做到这一点。请帮帮忙?

0 个答案:

没有答案