n = 3 # 打印3次同一个字符串或者列表 my_string = "python" my_list = [1, 2, 3] print(my_string*n) # pythonpythonpython print(my_string*n) # [1,2,3,1,2,3,1,2,3]