Display string multiple times
Python 2.x:
print '-' * 3
Python 3.x:
print('-' * 3)
The accepted answer is short and sweet, but here is an alternate syntax allowing to provide a separator in Python 3.x.
print(*3*('-',), sep='_')
Python 2.x:
print '-' * 3
Python 3.x:
print('-' * 3)
The accepted answer is short and sweet, but here is an alternate syntax allowing to provide a separator in Python 3.x.
print(*3*('-',), sep='_')