Created
July 4, 2017 00:56
-
-
Save wsricardo/cef5bb8205dbde656bf2b7e78234cb0f to your computer and use it in GitHub Desktop.
Manipulando textos Exemplo 01- Trecho de música de Luis Gonzaga
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/python3 -tt | |
#-*- coding: utf-8 -*- | |
# Author: Wandeson Ricardo | |
# Page: wsricardo.github.io | |
# Blog: wanartsci.blogspot.com | |
import re | |
import pprint | |
from pprint import * | |
# Trecho de música de Luis Gonzaga | |
texto = '''Eu só quero um amor | |
Que acabe o meu sofrer | |
Um xodó pra mim | |
Do meu jeito assim | |
Que alegre o meu viver''' | |
t = texto.split('\n') | |
f = [] | |
for i in t: | |
f.append(i.split()) | |
pprint(f) | |
print('\n') | |
# Mostrando | |
for i in f: | |
pprint(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment