String Split and Join

  • + 0 comments

    as i came with another way, i let you know...

    def split_and_join(line): l=line.split() return '-'.join(l)

    if name == 'main': line = input() result = split_and_join(line) print(result)