class Class:
def __init__(self):
self.value = 1
def method(self):
return 'something'
c = Class()
print(c.value) # 1
print(c.method()) # something
f = open('file.txt')
n = 0
while True:
data = f.read(2000)
if not data:
break
with open('file' + str(n) + '.txt', 'w') as f2:
f2.write(data)
n += 1
f.close()