0
错误:builtins.UnicodeDecodeError:“UTF-8”编解码器不能在448位解码字节0xa1:无效的起始字节快速排序算法的UnicodeDecodeError
def quicksort(Info):
lesser=[]
greater=[]
if len(Info) <= 1:
return Info
for swap in Info[1:]:
if swap < Info[0]:
lesser.append(swap)
else:
greater.append(swap)
print(quicksort(lesser)+Info[0:1]+quicksort(greater))
a= ['Babado Novo: Ver-te Mar', 'Natas es Satan', 'All Out War', '"The Cell"', '¡Ja me maaten...!', '"Formula 1: BBC Sport"', 'Ambos mundos', 'Angels with Dirty Faces', 'Barrio Gangsters', 'The LXD: The Secrets of the Ra', '90 Jahre Burgenland', 'La guitarra muda', 'Alma gitana', 'Depravada', 'Especial humor: Vaya... y vuelta', 'Entre las patas de los caballos', 'Fillet of Soul', 'Llamada', 'All of Her', "Hustler's Untrue Hollywood Stories: Angelina vs. Jennifer", 'Black Tranny Whackers 12', '"Davno ne videlis"', 'Anna II', '"The American Experience"', 'Meus Prêmios Nick 2012', 'Possessed', 'Holzapfel weiß alles', 'Lightspeed University: Cheerleader Power', 'Kid Millions', 'Monster High', '"Big Brother\'s Bit on the Side"', '"Britain\'s Got Talent"', "Heut' kommt's drauf an", "Buffalo Jill's on DVD 2004: Swimsuit Edition", '"Sigue, sigue Plàstic"', '"Move Like Michael Jackson"']
quicksort(a)
这将是很好有更多一点的上下文来帮助你。另外,你似乎在某些字符串中有“不寻常”的字符,你可能需要查看一下这些字符,并在python – bvidal
上进行一些编码/编码的研究。听起来很像这个问题,完全在'a = [ ......线,与你的快速排序实现无关。 – delnan
[这可以帮助你为什么](http://farmdev.com/talks/unicode/) – mojibuntu