This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Em Python 2.x existe dois tipos de string: | |
- str, cujos literais são escritos 'assim', "assim", '''assim''' ou """assim""" | |
- unicode, cujos literais são escritos u'assim', u"assim", | |
u'''assim''' ou u"""assim""" | |
O primeiro tipo, str, é na verdade um grande equívoco, pois assume que | |
1 byte == 1 caractere. Antes da Internet se tornar importante, a | |
maioria dos países do mundo podia se virar usando uma simples tabela | |
que mapeava caracteres para bytes. A mais famosa destas tabelas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
import re | |
from time import sleep | |
url = "http://pensador.uol.com.br/frases_curtas/" | |