In this HackerRank zero and One's problem solution, You are given the shape of the array in the form of space-separated integers, each integer representing the size of different dimensions, your task is to print an array of the given shape and integer type using the tools numpy.zeros and numpy.ones.

HackerRank Zeros and Ones in python problem solution

HackerRank Zeros and Ones in python problem solution

import numpy

input = tuple(map(int, raw_input().split()))

print numpy.zeros(input,'int')
print numpy.ones(input,'int')