"[pbs[i+1] for i, w in enumerate(pbs) if w == 'stop']"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": 106,
+ "metadata": {
+ "Collapsed": "false"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'ttargetrdfk'"
+ ]
+ },
+ "execution_count": 106,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "pbs = pb.split()\n",
+ "cat(pbs[i+1][0] for i, w in enumerate(pbs) if w == 'stop')"
+ ]
+ },
{
"cell_type": "code",
"execution_count": 90,