- #!/usr/bin/python
- #2011/09/18 by larry
- Success=['larry','ldh','wyy']
- for i in Success:
- Mailcontents='''
- Dear %s:
- you have been accepted as a linux system administrator and you can come to work next work.
- by boss
- 2011/09/18
- ''' % i
- f=file(i,'w')
- f.write(Mailcontents)
- f.close()
- #!/usr/bin/python
- #2011/09/18 by larry
- f=file('larry')
- while True:
- line=f.readline()
- if len(line)==0:
- break
- else:
- print line
- f.close
转载于:https://blog.51cto.com/5iqiong/667916