String Split and Join

  • [deleted]
    + 0 comments

    For Python3

    def split_and_join(line):
        return "-".join(line.split())
    
    if __name__ == '__main__':
        line = input()
        result = split_and_join(line)
        print(result)