Actually I'm using SPOJ to learn python, so I can't give an expert answer.
That being said, the library in 2.5 is expanded: in my case, I tried to use "ric.bit".partition("."), whose answer is the tuple ("ric",".","bit"). To get acc I had to replace partition() with split() and some extra glue logic.
Another nice thing is the ternary-operator idiom:
a="ric" if i<10 else "bit"
instead of
if i<10:
a="ric"
else:
a="bit"