我有一个名为"names.txt"的文件,其中包含以下内容:
{"1":[1988, "Anil 4"], "2":[2000, "Chris 4"], "3":[1988, "Rahul 1"],
"4":[2001, "Kechit 3"], "5":[2000, "Phil 3"], "6":[2001, "Ravi 4"],
"7":[1988, "Ramu 3"], "8":[1988, "Raheem 5"], "9":[1988, "Kranti 2"],
"10":[2000, "Wayne 1"], "11":[2000, "Javier 2"], "12":[2000, "Juan 2"],
"13":[2001, "Gaston 2"], "14":[2001, "Diego 5"], "15":[2001, "Fernando 1"]}
Run Code Online (Sandbox Code Playgroud)
问题陈述:文件"names.txt"包含一些格式的学生记录 -
{"number": [year of birth, "name rank"]}
解析此文件并根据年份对其进行隔离,然后根据排名对名称进行排序.首先进行隔离然后排序.输出应采用以下格式 -
{year : [Names of students in sorted order according to rank]}
Run Code Online (Sandbox Code Playgroud)
所以预期的产量是 -
{1988:["Rahul 1","Kranti 2","Rama 3","Anil 4","Raheem 5"],
2000:["Wayne 1","Javier 2","Jaan 2","Phil 3","Chris …
Run Code Online (Sandbox Code Playgroud) 如何通过PowerShell在Windows(pagefile.sys)上设置页面文件的大小?
aggregate ×1
fileparsing ×1
grouping ×1
pagefile ×1
powershell ×1
python ×1
sorting ×1
system ×1