You are viewing a single comment's thread. Return to all comments →
import numpy as np
a = input().strip() b = list(map(int,a.split()))
zeros_array = np.zeros(b, dtype=int) ones_array = np.ones(b, dtype=int)
print(zeros_array) print(ones_array)
Seems like cookies are disabled on this browser, please enable them to open this website
Zeros and Ones
You are viewing a single comment's thread. Return to all comments →
import numpy as np
a = input().strip() b = list(map(int,a.split()))
zeros_array = np.zeros(b, dtype=int) ones_array = np.ones(b, dtype=int)
Print the arrays
print(zeros_array) print(ones_array)