task : you are given a string. split the string on a " "(space) delimiter and join using a - hyphen.
returns. : the resulting string.
input format : the on line contains a string consisting of space separated words.
코드
# HackerRank, String Split and Join, python3defsplit_and_join(line):# write your code herereturn'-'.join(line.split(' '))if __name__ =='__main__':
line =input()
result = split_and_join(line)print(result)