if list is empty append "" in java code example Example: empty list python and fill it at specific position l = [None for _ in range(200)] l[2] = 2 l[177] = 177