Solve Problems by Coding Solutions - A Complete solution for python programming
my_list = ['python', 'for', 'engineers', 'like',
'complete','solution', 'for', 'python',
'related','queries']
def divide_chunks(l, n):
for i in range(0, len(l), n):
yield l[i:i + n]
n = 5
x = list(divide_chunks(my_list, n))
print (x)
Post a Comment
No comments:
Post a Comment