user3761151
user3761151

Reputation: 143

Wrapping output into string with same length as output

If I have such string:

link = '|link: http://www.facebook.com |'

how can I print such string with arrows?:

|link: http://www.facebook.com |
<=============================>

The length of arrow string is equal to len(link)

Upvotes: 0

Views: 27

Answers (1)

ambi
ambi

Reputation: 1316

print "<{}>".format('='*(len(link)-2))

Upvotes: 1

Related Questions