I have an RDD that is populated as 

```
id              txt 
1              A B C
2              A B C
1              A B C

```

The result of my word count (pyspark) should be for a combination of string and id associated with it. Example:

```
[(u'1_A',2), (u'1_B',2), (u'1_C',2),(u'2_A',1),(u'2_B',1),(u'2_C',1)] 

```

I tried using a user defined function to combine id with string splits from text. It, however, complains that the append function is unavailable in this context.

Appreciate any code samples that will set me in the right direction.