Home > Backend Development > Python Tutorial > Python实现竖排打印传单手机号码易撕条

Python实现竖排打印传单手机号码易撕条

WBOY
Release: 2016-06-06 11:22:34
Original
3758 people have browsed it

使用python 2.7,初学,代码比较简单。

numPrinter.py

代码如下:


#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
    @Author:Quico Tomy
    @Function:Input a phone number and print by line
    @Demo Time:2015-3-16
'''
numstr = raw_input("Input number: ")
num = list(numstr)
 
f = open('num.doc', 'a')
for i in range(11):
    for j in range(9):
        f.write(num[i] + '\t\t')
    f.write(num[i] + '\n')
 
f.close()

以上就是本文分享给大家的全部内容了,希望大家能够喜欢。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template