How to Create a List with a Specific Length in Python

Fatos Morina
Python in Plain English
1 min readAug 16, 2021

--

Photo by Glenn Carstens-Peters on Unsplash

When you create a new array in Java, you can set up the length of it. If you are programming mostly in Python these days, then you may not be aware that you can also do that in Python.

Let’s say that we have a fixed number of students and we want to save their heights in a list.

--

--