Repeat a string: Difference between revisions

m
→‎{{header|Python}}: output comments
m (→‎{{header|Python}}: output comments)
Line 1,683:
<lang python>def repeat(s, times):
return s * times
 
print(repeat("ha", 5))</lang>
# output:
# hahahahaha
 
=={{header|Prolog}}==
Anonymous user