Commit 5eedd7cf by BellCodeEditor

save project

parent 15a4031f
...@@ -2,7 +2,12 @@ class y: ...@@ -2,7 +2,12 @@ class y:
def __init__(self,a,w): def __init__(self,a,w):
self.a=a self.a=a
self.w=w self.w=w
fb=y(234,345) def jkf(self):
sd=y(456,567) self.a=self.a+2
print('fb',fb.a) self.w=self.w+2
print('sd',sd.w) we=y(12,546)
ar=y(3,67)
print('we',we.a)
we.jkf()
we.jkf()
print('we',we.a)
\ No newline at end of file
a=[18,28,38,2,77,88,52]
b=a[0]
c=1
d=a[0]
while c<len(a):
if a[c]>b:
b=a[c]
if a[c]<d:
d=a[c]
c+=1
print(b+d)
list=['张','关','李','赵','钱','孙','李']
print(list[-3])
list[-2]='猴'
print(list)
list.insert(-3,'李')
print(list)
list.pop(3)
print(list)
list.append('王')
print(list)
d=['250','360','470']
list.extend(d)
print(list)
print(list[1:6])
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