Buonasera a tutti.
mi potreste dare un suggerimento relativamente ai caratteri speciali e agli utf-8?
qui di seguito il codice che sto scrivendo:
# -*- coding: utf-8 -*-
import string
import unicodedata
import re
#SEZIONE APRI FILE E NORMALIZZAZIONE TESTO
def aprifile():
	stesto=""
	puntegg=[",", ".", ";", ":", "!", "?", "'", "£", "$", "%", "&", "/", "(", ")", "=", "^", "'", "-", "_", " ", "<", ">", "«", "»", "[", "]"]
	stestoSenzaPunti=""
	conta=0
	
	#listaparol=[]
	p=open("prova.txt", "r")
	for riga in p:
		stesto=stesto+riga
		lunghezza=0
		print "stesto: ", stesto
		for char in stesto:
			#lunghezza=0
			lunghezza +=1
			if char in puntegg:
				lunghezza -=1
				stestoSenzaPunti=stestoSenzaPunti+" "
			elif (char == "à" or char == "À"):
				stestoSenzaPunti=stestoSenzaPunti+"a"
			elif (char == "è" or char == "È"):
				stestoSenzaPunti=stestoSenzaPunti+"e"
			elif (char == "é" or char == "É"):
				stestoSenzaPunti=stestoSenzaPunti+"e"
			elif (char == "ì" or char == "Ì"):
				stestoSenzaPunti=stestoSenzaPunti+"i"
			elif (char == "ò" or char == "Ò"):
				stestoSenzaPunti=stestoSenzaPunti+"o"
			elif (char == "ù" or char == "Ù"):
				stestoSenzaPunti=stestoSenzaPunti+"u"
			elif char == "\n":
				stestoSenzaPunti=stestoSenzaPunti#+""
			elif char == "\t":
				stestoSenzaPunti=stestoSenzaPunti#+""
			#elif char.isupper():
			#	stestoSenzaPunti=stestoSenzaPunti+char.lower()
			else:
				#if char.isupper():
				#	stestoSenzaPunti=stestoSenzaPunti+char.lower()
				stestoSenzaPunti=stestoSenzaPunti+char
			print "lunghezza " , lunghezza
			print "lengh stestoSenzaPunti", len(stestoSenzaPunti)
			if lunghezza > 0:
				print "carattere  ", char
			conta +=1
			print "conta: ", conta
	listaparol = stestoSenzaPunti.split(" ")
	
	p.close()
	return listaparol
if __name__ == "__main__":
	i=0
	listaparole=[]
	listaparole = aprifile()
	f = (len(listaparole))-1
	print ("TESTO NON ORDINATO \n\n "), listaparole
il file che legge e' un banale .txt con un pò di testo!
ma come ci sono le lettere accentate, gli elif neanche li vede e mi da i caratteri " \x e qualche cosa" come nell'esempio:
 ['Non', 'solo', 'computer', 'e', 'nutrizione', '', '', 'm\xe0'].
Avete suggerimenti?
Ne va di un esame all'uni!!
Grazie comunque 
Gianluca