def rubikstring(s):
import string
cumu = ''
for c in s:
if c in string.ascii_letters:
if cumu: yield cumu
cumu = ''
cumu += c
if cumu: yield cumu
could do your job. With
>>> for i in rubikstring("RL2R'F2LD'"): i
...
'R'
'L2'
"R'"
'F2'
'L'
"D'"
you get your desired result, with
>>> list(rubikstring("RL2R'F2LD'"))
['R', 'L2', "R'", 'F2', 'L', "D'"]
as well.