Answers for "make list of zeros python"

12

make a zero list python

listofzeros = [0] * n
Posted by: Guest on March-11-2020
1

create zero array in python

# WE CAN USE NUMPY FOR THIS 
import numpy as np
np.zeros(5) # Creates an array [0., 0., 0., 0., 0.]

# For integer array of zeros

np.zeros((5,), dtype=int) # Creates array [0, 0, 0, 0, 0]
Posted by: Guest on October-19-2021

Code answers related to "make list of zeros python"

Python Answers by Framework

Browse Popular Code Answers by Language