吴青峰学生作业

# print("hello world")

# print("test")

#

# a = input()

# print(type(a))

#

# b = list(a)

# print(b)

# a=[]

# b=[1,2,'abd',[2,3,4]]

# for i in range(len(b)):

#     print([i])

#     for item in b:

#         print([i])

#     if 2 in b:

#         print("success")

#     else:

#         print("fail")

list_1 = [1,2,3]

# for i in range(100):

#  list_1.append(100)

#  print("b=",list_1)

del list_1[2]

print(list_1)

list_2=[4,5]

print(list_1+list_2)

list_4=["芝麻","花生","砖石","草莓"]

print(len(list_4))

print(list_4[1:3])

list_5=[1,58,69,5,789,250]

print(max(list_5))

print(min(list_5))

#Counter函数统计每个元素出现的总次数

from collections import Counter

string1="n the long view, the human relationship with forests has been one of brutal destruction,but even it carries elements of slow hope."

list_6=Counter(string1)

#用counter方法快速统计每个单词出现的次数

print(list_6)

你可能感兴趣的:(python,java,numpy)