Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/07/2013, 14:58
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 1 mes
Puntos: 1360
Respuesta: Manipulacion de caracteres en python3

Deberías leer sobre str vs bytes

Código Python:
Ver original
  1. # Asumo que line son bytes
  2. currentline = line.strip()
  3. # Recuerda no mezclar string y bytes
  4. if not currentline or currentline.startswith(b'$') or currentline.startswith(b'\n'):