python saveastextfile

samples = sc.parallelize([
    ("[email protected]", "Alberto", "Bonsanto"),
    ("[email protected]", "Miguel", "Bonsanto"),
    ("[email protected]", "Stranger", "Weirdo"),
    ("[email protected]", "Dakota", "Bonsanto")
])

print samples.collect()

samples.saveAsTextFile("folder/here.txt")
read_rdd = sc.textFile("folder/here.txt")

read_rdd.collect()
Glorious Gannet