並べ替えられていない単語のリストをタプルのリスト (単語、カウント) に変換するにはどうすればよいですか?
["AAA","America", "England", "Spain"," Ireland"," aeroplane",
"aeroplane", "Aeroplane", "AeRoPlAne", "helicopter", "HELICOPTER",
"Zebra", "America", "Elephant", "abc", "A.B.C." , "haskell", "Haskell", "ZZZ", "zzz"]
期待される出力:
[("a.b.c.",1),("aaa",1),("abc",1),("aeroplane",4),("america",2),("elephant",1)
,("england",1),("haskell",2),("helicopter",2),("ireland",1),("spain",1),("zebra",1),("zzz",2)]
[("a.b.c",1), ("zzz", 2)]