编辑代码

ramdom_name="alpha"
value=98
print(ramdom_name+str(value))

print((ramdom_name+" ")*3)

title= "Gone with the Wind!"
print(len(title))
print(title[0:4])
print(title[-5:-1])

trail1="what's your favourate food?"
trail1=trail1.replace("food","film")
print(trail1)

trail2="I like you~"
print(trail2.replace("like","love"))

quote='what\'s your name?'
print(quote)

poem="I like you\nto be still"
print(poem)

lyrics="sometimes i feel like an inland ocean"
lyrics+="\ntoo big to be a lake"
lyrics+="\ntoo small to be an attraction"
print(lyrics)

words="""be my lover
my lady \
river"""
print(words)

path=r"A:\notes"
print(path)

myList=["Beco","Sabrina",926,666,1314]
print(myList[0]+" and "+myList[1])
print("Here is a list:"+str(myList))
print(len(myList))
print(myList[-3:-1])
print(myList[-1])
myList.append(520)
print(myList)

relatives=['mom','dad','granny','uncle']
lovers=['Q','Max','Sabrina']
friends=['Vickey','Lillian','Pupu','Lynn']
people=[relatives,lovers,friends]
print(people)
print(len(people[1]))
print(people[0][0])

version=tuple(people)
print(version)

lovers[1]='shit'
print(lovers)