多次显示字符串


89

我想打印一个字符或字符串,例如'-'n次。

我可以不使用循环就做吗?

print('-',3)

..这意味着打印-3次,如下所示:

---

Answers:



By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.