Create empty list size 'n'

PHOTO EMBED

Tue Apr 04 2023 04:05:30 GMT+0000 (Coordinated Universal Time)

Saved by @tofufu #python

n = 5
lst = [None] * n
print(lst)
# [None, None, None, None, None]
content_copyCOPY

https://blog.finxter.com/how-to-create-a-python-list-of-size-n/