I have an array like ['a','b','c','d','e','f']. How can i convert it to an array of arrays such that [['a','b'],['c','d'],['e','f']]
I have tried appending it normally but it give some random result
inputArr = input.split(',')
i=0
Yy = []
while i < len(inputArr):
temp = [inputArr[i], inputArr[i+1]]
Yy.append(temp)
i += 2
Output : [ 'a', 'b,c', 'd,e', 'f' ]
print(Yy)gives[['a', 'b'], ['c', 'd'], ['e', 'f']]inputArrand notYy?