I have an RDD object, a list of lists, that looks like this (omitted millions of sublists, only left 3 here)
my_tuples = [[('a','b'),('a','c')],
[('b','a'),('b','f'),('b','g')],
[('zzsx','c'), ('zzsx','q'), ('zzsx','m'), ('zzsx','ay'), ('zzsx','bbt')]]
and I want to convert it into a single list like this
my_list = [('a','b'),('a','c'), ('b','a'),('b','f'),('b','g'),
('zzsx','c'), ('zzsx','q'), ('zzsx','m'), ('zzsx','ay'), ('zzsx','bbt')]
I can't use loops since my_tuples is an RDD object and the size of my_tuples is too large to do it. I'm new to spark, any suggestion is appreciated. Thanks.