第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

是不是可以不用全部替換掉?

L = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']

L[0]='Ellena'

L[1]='Alice'

L[4]='Bob'

print(L)


正在回答

3 回答

# Enter a code

# coding:utf-8

names = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']

scores = [89, 72, 88, 79, 99]


templateNames = []

templateScores = [89, 72, 88, 79, 99]


scores.sort(reverse=True)

print("降序排列后的成績(jī):" + str(scores))


index_Score = 0

index_TemplateScore = 0

for score in scores:

? ? index_TemplateScore = 0


? ? for templateScore in templateScores:

? ? ? ? if score == templateScore:

? ? ? ? ? ? templateNames.append(names[index_TemplateScore])

? ? ? ? index_TemplateScore += 1


print("排列后的名字:" + str(templateNames))


0 回復(fù) 有任何疑惑可以回復(fù)我~

L = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']

N = [89,72,88,79,99]

dictA=dict(zip(L,N))

dictB=sorted(dictA, key=dictA.get, reverse = True)

print(dictB)


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕俠1360900

dictA, key=dictA.get,求解釋??
2021-02-05 回復(fù) 有任何疑惑可以回復(fù)我~
#2

qq_老老宋_0 回復(fù) 慕俠1360900

同樣求解
2022-06-07 回復(fù) 有任何疑惑可以回復(fù)我~

對(duì)的 不用全部替換

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_謝謝惠顧_2

這難道是什么很好的方法嗎 我不是很明白
2020-11-10 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

是不是可以不用全部替換掉?

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)