>
>
>
> fc = open('archivo.txt','r')
>
> for linea in fc:
>     b = linea.rfind('|')
>     posi = b + 1
>     posf = posi + 9
>     secuenciac = linea[posi:posf]
>     print secuenciac
>
>
>


Has probado

fc = open(.....)
for linea in fc:
    secuenciac = linea.split('|')[-1]

?
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a