you can slice off what you want:
so:
>>> zz = 'This is a rather long rambling, uninformative sentence.' >>> zstr = zz[:20] >>> len(zstr) 20 >>> zstr 'This is a rather lon' >>>But this is not exactly what you are asking.
so:
>>> tokens = zz.split() >>> tokens ['This', 'is', 'a', 'rather', 'long', 'rambling,', 'uninformative', 'sentence.'] >>> yy = ' '.join(tokens[:5]) >>> yy 'This is a rather long' >>>