-5

How do I remove the quote marks and commas and brackets from this result:

    encrypt = input("enter your string: ")
    encrypt = encrypt.replace(" ","")
    encrypt_list = [encrypt[i:i+5] for i in range(0, len(encrypt), 5)]
    print (encrypt)
    print (encrypt_list)

If the input was: 5 blocks of text test

The output is: ['5bloc', 'ksoft', 'extte', 'st']

I need it to be: 5bloc ksoft extte st

Delgan
  • 18,571
  • 11
  • 90
  • 141
bdb
  • 23
  • 1
  • 4

1 Answers1

1

You can use str.join, like this:

>>> s = ' '.join(['5bloc', 'ksoft', 'extte', 'st'])
>>> print(s)
5bloc ksoft extte st
eskaev
  • 1,108
  • 6
  • 11