Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从以下位置制作列表列表:
data = ['a','b','c','d','e','f','g','h','i']
至
data = [['a','b','c'],['d','e','f'],['g','h','i']]
[a[i:i+3] for i in range(0, len(a), 3)]