0

I need to insert a '*' between each two characters in a string in Python, for example, for 'ABCDE' I need to get 'A*B*C*D*E'. What's a Python way of doing it?

1
  • 1
    '*'.join('ABCDE') Commented Jan 16, 2021 at 11:26

1 Answer 1

0

This could be a solution

string ='ABCDE'
x = '*'
print(x.join(string))
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.