如下:
#!/usr/bin/python # -*- coding: utf-8 -*- import sys list_a = [1,2,3] list_b = [] for x in list_a: list_b.extend([x]*3) print(str(list_b))