Skip to content

Instantly share code, notes, and snippets.

@rostyq
Created July 27, 2017 16:34
Show Gist options
  • Save rostyq/317b0e15d417c26f197502b71ea041bf to your computer and use it in GitHub Desktop.
Save rostyq/317b0e15d417c26f197502b71ea041bf to your computer and use it in GitHub Desktop.
import numpy
def rnd():
return numpy.random.randint(0, 100, numpy.random.randint(10, 20))
a, b = rnd(), rnd()
c = [i for i in a if i in b]
print("First array: {0}\nSecond array: {1}\nArray of common items: {2}".format(a, b, c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment