#!/usr/bin/python
# -*- coding: utf-8 -*-
lista_palabras = []
romeo = open('romeo.txt')
for linea in romeo:
for palabra in linea.split():
if palabra not in lista_palabras:
lista_palabras.append(palabra)
lista_palabras.sort()
print lista_palabras
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.