换行的:
# -*- coding: utf-8 -*-
#!/usr/bin/env python
conuter = 111111
while conuter < 111501:
print '%d;' %(conuter)
conuter+=1
不换行的:
# -*- coding: utf-8 -*-
#!/usr/bin/env python
strEnd = ""
strConver=""
conuter = 111111
while conuter < 111501:
strEnd = strEnd + str(conuter) + ';'
conuter+=1
print strEnd
输出文本的:
# -*- coding: utf-8 -*-
#!/usr/bin/env python
strEnd = ""
strConver=""
conuter = 111111
while conuter < 111501:
strEnd = strEnd + str(conuter) + ';'
conuter+=1
fileHandle = file('1.txt','w')
fileHandle.write(strEnd)
fileHandle.close
print strEnd