查看函数比较美观
每次左右拖动很难受
直接代码:
#!/usr/bin/python # -*- coding: UTF-8 -*- #auther linyoushu@qq.com import urllib.parse class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' # 天道好轮回,苍天饶过谁 count = 0 time = 5 for function_ in dir((urllib.parse)): count = count + 1 if count ==1: function_1 = function_ if count ==2: function_2 = function_ if count == 3: function_3 = function_ if count == 4: function_4 = function_ if count == 5: function_5 = function_ if count == time: print(bcolors.WARNING + function_1 + bcolors.ENDC, bcolors.HEADER + function_2 + bcolors.ENDC, bcolors.OKBLUE + function_3 + bcolors.ENDC, bcolors.OKGREEN + function_4 + bcolors.ENDC, bcolors.FAIL + function_5 + bcolors.ENDC) count = count - time