python源码解释如下:map(func, *iterables) --> map objectMake an iterator that computes the function using arguments fromeach of the iterables. Stops when the shortest iterable is exhausted.简单来说, map()它接收一个函数 f 和一个 可迭代对象(这里理解成 list),并通过把函数 f 依次作用在 list 的每个元素
# \r 默认表示将输出的内容返回到第一个指针,这样的话,后面的内容会覆盖前面的内容 def main(): for i in range(65,91): s="\r{name:s}".format(name=chr(i)) time.sleep(0.5) sys.stdout.write(s) main() # r 的用法 s="\tt" #如果这样输出的话,则\t会变成制表符号,将有一个table键作用产生 ns=r"\tt" print(s