Commit dd8cdd2a by BellCodeEditor

save project

parent 4786c9be
Showing with 34 additions and 14 deletions
# 和你的小伙伴用列表讲讲桃园结义的故事,并说说这其中运用了哪些列表知识: dict_hero={'猴三':10,'猴一':21,'猴队长':39}
# 来,我给你起个头~ print(dict_hero)
# 从前啊,有三个bro,分别是:刘备、关羽、张飞... print(dict_hero['猴队长'])
bro1="关羽" dict_hero['猴队长']=40
bro2="刘备" print(dict_hero)
bro3="张飞" \ No newline at end of file
bros=["刘备","关羽","张飞"]
bro1=["关羽",160,8.5]
bro2=["刘备",161,9.1]
bro3=["张飞",166,8.3]
bros[0]="关羽"
bros[1]="刘备"
print(bros)
\ No newline at end of file
m="诺伊,周末一去漫展吧!"
length=len(m)
i=0
while i<length:
e=m[i]
print(e)
i=i+1
import random
key = "0考古与科技处粗犷豪放杜绝v北京东方"
m="诺伊,周末一去漫展吧!"
km=""
pp="@@@@@@^^^^^^))))))))&&&&"
for i in m:
p1=i
p2=random.choice(key)
p3=random.choice(key)
text=p1+p2+p3
km=km + text
list_m=list(km)
index = random.randint(0,len(km))
list_m.insert(index,pp)
result_m="".join(list_m)
print(result_m)
print(km)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment