I am using underscores to represent the length of a unknown word. How can I print just the underscores without the brackets that represent the list?
Basically, if I have a list of the form ['_', '_', '_', '_']
, I want to print the underscores without printing them in list syntax as "_ _ _ _"
Does this work for you
>>> my_dashes = ['_', '_', '_', '_']
>>> print ''.join(my_dashes)
____
>>> print ' '.join(my_dashes)
_ _ _ _
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With