91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

[python]列表的操作

發布時間:2020-03-30 23:55:34 來源:網絡 閱讀:293 作者:望天兒先生 欄目:編程語言

1
magicians = ['alice', 'david', 'carolina']
for magician in magicians:
print(magician)

for magician in magicians:
print(magician.title()+",that was a great trick!")
print("I can't wait to see your next trick," +magician.title()+".\n")

print("thank you,everyone.That was a great magic show!")

2
for value in range(1,5):
print(value)

numbers=list(range(1,6))
print(numbers)

numbers=list(range(1,10,3)) ##3是步長
print(numbers)

squares = []
for value in range(1,11):
square = value**2
squares.append(square)
print(squares)

squares = []
for value in range(1,11):
squares.append(value**2)
print(squares)

squares = [value**2 for value in range(1,11)]
print(squares)

3
digits=[1,2,3,4,5,6,7,8,9]
print(min(digits))
print(max(digits))
print(sum(digits))

4
n2 = [num for num in range(1,21,2)]
print (n2)

n3 = [num for num in range(3,31)]
for num1 in n3:
if num1 % 3 == 0:
print(num1)

n4 = [num**3 for num in range(1,11)]
print (n4)

player = ['charls','martina','michael','florence','eli']
print(player[0:3])
print(player[:2])
print(player[2:])
print(player[-3:])
player1=player[:] ##復制
print(player1)

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

云南省| 嘉鱼县| 大港区| 包头市| 斗六市| 广德县| 岳普湖县| 黄浦区| 关岭| 仙居县| 茂名市| 平罗县| 屯留县| 巩义市| 五莲县| 封丘县| 东台市| 泰安市| 运城市| 宽城| 伽师县| 甘谷县| 阿坝县| 化州市| 东山县| 天津市| 台北市| 遂平县| 通化县| 化德县| 隆子县| 岢岚县| 湛江市| 克拉玛依市| 兴安县| 肇源县| 正安县| 邯郸市| 蓬莱市| 永川市| 青龙|