-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.py
68 lines (56 loc) · 1.17 KB
/
class.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<<<<<<< HEAD
# -*- coding: utf-8 -*-
class Student(object):
# name = ''
# number = ''
def __init__(self,name='a',number = '123456'):
self.name = name
self.number = number
def test(self,*argu):
sum = 0
for i in argu:
print(i)
sum += i
print(sum)
self.getStudentInfo()
def getStudentInfo(self):
print(self.name,self.number)
if __name__ == '__main__':
import sys
args = sys.argv
num = range(1,10)
# del(Student.name)
student = Student('lmm','654321')
student.test(*num)
# student.getStudentInfo()
print(Student)
print(student.name)
=======
# -*- coding: utf-8 -*-
class Student(object):
# name = ''
# number = ''
def __init__(self,name='a',number = '123456'):
self.name = name
self.number = number
def test(self,*argu):
sum = 0
for i in argu:
print(i)
sum += i
print(sum)
self.getStudentInfo()
def getStudentInfo(self):
print(self.name,self.number)
if __name__ == '__main__':
import sys
args = sys.argv
num = range(1,10)
# del(Student.name)
student = Student('lmm','654321')
student.test(*num)
# student.getStudentInfo()
print(Student)
print(student.name)
>>>>>>> 7aeeaf3d607e377b01a1647554ed4bfd2b20463c
print(args[1])