How it works...

Let's break down the two methods in the preceding code snippet: sc.parallelize() and take().