【发布时间】:2014-03-23 13:07:08
【问题描述】:
我可以做些什么来对齐这段代码中的所有列?是正确的还是...?
import urllib.request
from re import findall
def determinarLlegadas(numero):
llegadas = urllib.request.urlopen("http://...")
llegadas = str (llegadas.read())
llegadas = findall ('<font color="Black" size="3">(.+?)</font>',llegadas)
print ('\t','VUELO ','\t','AEROLINEA','\t','PROCEDENCIA','\t','FECHA ','\t',' HORA ','\t','ESTADO','\t','PUERTA')
a = 0
numero = numero * 7
while numero > a:
print ('\t',llegadas[a+0],'\t',llegadas[a+1],'\t',llegadas[a+3],'\t',llegadas[a+3],'\t',llegadas[a+4],'\t',llegadas[a+5],'\t',llegadas[a+6])
a = a + 7
【问题讨论】:
标签: python python-3.x string-formatting spacing