Commit 26bf721d by BellCodeEditor

auto save

parent 7e9f8f47
Showing with 25 additions and 3 deletions
"""
a=input("水果")
print(a)
ls=a.split()
print(ls)
d={}
for i in ls:
d[i]=d.get(i,0)+1
print(d)
ls=list(d.items())
print(ls)
ls.sort(key=lambda func:func[1],reverse=True)
print(ls)
"""
ls=[51,33,54,56,67,88,431,141,72,45,2,78,13,15,5,69]
ls1=[]
for i in range(len(ls)):
for j in range(2,ls[i]):
if ls[i]%j==0:
ls1.append(ls[i])
break
print(ls1)
\ No newline at end of file
filel = open() filel = open(r'Users/teng')
filel.write('小兰:12本') filel.write('小兰:12本')
filel.close() filel.close()
\ No newline at end of file
小兰:12本
\ 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