重复打印字符串

字符串"abc",输出"abcabcabc"
print('abc'*3)

 

重复打印字符串'tt'5次

输出:

tt

tt

tt

tt

tt

for _ in range(5):
    print('tt')

 

posted @ 2024-05-23 17:42  悠然现南山  阅读(2)  评论(0编辑  收藏  举报