In this HackerRank Inner and Outer problem solution You are given two arrays: A and B. Your task is to compute their inner and outer product.

HackerRank Inner and Outer in python problem solution

HackerRank Inner and Outer in python problem solution

import numpy

a = numpy.array(map(int, raw_input().split()))
b = numpy.array(map(int, raw_input().split()))
print numpy.inner(a, b)
print numpy.outer(a, b)