# -*- coding: utf-8 -*-
"""
Created on %(date)s

@author: %(shenxianjun)s

#E_mail: shenxianjun.patrick@gmail.com

"""

print("{}".format("hello"))

"{}".format("hello")



import os
os.curdir()

file=open('word.txt','r')
content=file.readline(limit=10)
print(content)
file2=open(r'C:\Users\Administrator\Desktop\new_word.txt','w')
content2=file2.write(content)
file.close()
file2.close()





#通过readline输出，对于比较大的文件，这种占用内存比较小。
#coding:utf-8

f = open('word.txt','r')
result = []
for line in open('word.txt'):
    line = f.readline()
    result.append(line)
f.close()
open('result-readline.txt', 'w').write('%s' % '\n'.join(result))

3cab3de255f4e1a7d3289712adf67203ea99f767
<mask token>

<mask token>
print('{}'.format('hello'))
"""{}""".format('hello')
<mask token>
os.curdir()
<mask token>
print(content)
<mask token>
file.close()
file2.close()
<mask token>
for line in open('word.txt'):
    line = f.readline()
    result.append(line)
f.close()
open('result-readline.txt', 'w').write('%s' % '\n'.join(result))

<mask token>
print('{}'.format('hello'))
"""{}""".format('hello')
<mask token>
os.curdir()
file = open('word.txt', 'r')
content = file.readline(limit=10)
print(content)
file2 = open('C:\\Users\\Administrator\\Desktop\\new_word.txt', 'w')
content2 = file2.write(content)
file.close()
file2.close()
f = open('word.txt', 'r')
result = []
for line in open('word.txt'):
    line = f.readline()
    result.append(line)
f.close()
open('result-readline.txt', 'w').write('%s' % '\n'.join(result))

<mask token>
print('{}'.format('hello'))
"""{}""".format('hello')
import os
os.curdir()
file = open('word.txt', 'r')
content = file.readline(limit=10)
print(content)
file2 = open('C:\\Users\\Administrator\\Desktop\\new_word.txt', 'w')
content2 = file2.write(content)
file.close()
file2.close()
f = open('word.txt', 'r')
result = []
for line in open('word.txt'):
    line = f.readline()
    result.append(line)
f.close()
open('result-readline.txt', 'w').write('%s' % '\n'.join(result))

# -*- coding: utf-8 -*-
"""
Created on %(date)s

@author: %(shenxianjun)s

#E_mail: shenxianjun.patrick@gmail.com

"""

print("{}".format("hello"))

"{}".format("hello")



import os
os.curdir()

file=open('word.txt','r')
content=file.readline(limit=10)
print(content)
file2=open(r'C:\Users\Administrator\Desktop\new_word.txt','w')
content2=file2.write(content)
file.close()
file2.close()





#通过readline输出，对于比较大的文件，这种占用内存比较小。
#coding:utf-8

f = open('word.txt','r')
result = []
for line in open('word.txt'):
    line = f.readline()
    result.append(line)
f.close()
open('result-readline.txt', 'w').write('%s' % '\n'.join(result))
