I was recently studying someone's code and a portion of code given below
class Node:
def __init__(self, height=0, elem=None):
self.elem = elem
self.next = [None] * height
What does it mean by [None] * height
in the above code
I know what does *
operator (as multiplication and unpacking) and None
means in python but this is somehow different.