String Split and Join

Sort by

recency

|

1065 Discussions

|

  • + 0 comments

    def split_and_join(line): # write your code here

    return '-'.join(line.split(' '))
    
  • + 0 comments
    def split_and_join(line):
        line=line.split(' ')
        applesauce='-'.join(line)
        return applesauce
    
  • + 0 comments

    return "-".join(line.split(" "))

  • + 0 comments

    def split_and_join(line): # write your code here a = "-".join(line.split(" ")) return a

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

  • + 0 comments

    def split_and_join(line): line = line.split(" ") line = "-".join(line) print(line)