1>>>print(l)2['10.0\t6.0\t-12.136\t-2.499\n','9.0\t5.0\t4.880\t-1.051\n','3.0\t5.0\t6.072\t-0.630\n','7.0\t3.0\t25.789\t0.801\n','6.0\t3.0\t-13.696\t2.702\n','4.0\t1.0\t-7.623\t-3.802\n','5.0\t1.0\t15.421\t-4.963\n','10.0\t2.0\t-13.247\t-2.756\n','1.0\t3.0\t-0.897\t-3.588\n','6.0\t3.0\t-1.648\t2.958\n','6.0\t1.0\t-15.427\t-3.081\n','7.0\t3.0\t19.761\t-1.834\n','7.0\t5.0\t1.221\t2.980\n','7.0\t6.0\t-0.506\t-0.423\n','10.0\t4.0\t26.638\t-2.038\n','5.0\t6.0\t-10.222\t-3.705\n','6.0\t3.0\t26.416\t3.684\n','5.0\t1.0\t11.384\t3.758\n','4.0\t6.0\t7.098\t-0.432\n','5.0\t2.0\t17.753\t-3.231\n']3>>>4>>> d ={}5>>>for x in l:6... f =float(x.split('\t')[1])7...if f in d:8... d[f].append(x)9...else:10... d[f]=[x]11...12>>> sl =sorted(list(d.items()), key=lambda x: x[0])13>>>14>>>for i in sl:15...print(i[0],':')16...print(i[1],'\n')17...181.0:19['4.0\t1.0\t-7.623\t-3.802\n','5.0\t1.0\t15.421\t-4.963\n','6.0\t1.0\t-15.427\t-3.081\n','5.0\t1.0\t11.384\t3.758\n']20212.0:22['10.0\t2.0\t-13.247\t-2.756\n','5.0\t2.0\t17.753\t-3.231\n']23243.0:25['7.0\t3.0\t25.789\t0.801\n','6.0\t3.0\t-13.696\t2.702\n','1.0\t3.0\t-0.897\t-3.588\n','6.0\t3.0\t-1.648\t2.958\n','7.0\t3.0\t19.761\t-1.834\n','6.0\t3.0\t26.416\t3.684\n']26274.0:28['10.0\t4.0\t26.638\t-2.038\n']29305.0:31['9.0\t5.0\t4.880\t-1.051\n','3.0\t5.0\t6.072\t-0.630\n','7.0\t5.0\t1.221\t2.980\n']32336.0:34['10.0\t6.0\t-12.136\t-2.499\n','7.0\t6.0\t-0.506\t-0.423\n','5.0\t6.0\t-10.222\t-3.705\n','4.0\t6.0\t7.098\t-0.432\n']
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/01/31 14:11
2021/01/31 15:05