list = [('a5', 1), 1, ('a1', 1), 0, 0]
I want to group the elements of the list into 3, if the second or third element is missing in the list 'None' has to appended in the corresponding location.
exepected_output = [[('a5', 1), 1,None],[('a1', 1), 0, 0]]
Is there a pythonic way for this? New to this, any suggestions would be helpful.