solutions

Insert dashes every 3 characters

Write a function insert_dashes that receives a string and inserts dashes every 3 characters. Example:

insert_dashes('Hello World')  # 'Hel-lo -Wor-ld'
insert_dashes('AwesomePythonRmotr')  # 'Awe-som-ePy-tho-nRm-otr-'

Test Cases

test with short string - Run Test

def test_with_short_string():
    assert insert_dashes('Python') == 'Pyt-hon-'

test with large string - Run Test

def test_with_large_string():
    assert insert_dashes('Python is Awesome') == 'Pyt-hon- is- Aw-eso-me'