pta题库 python

从键盘读入2个字符串,然后输出。提示使用print函数中的sep和end参数。

输入格式:
输出格式:
对每一组输入,在一行中输出,字符串间以‘-’间隔,结尾为‘!'。

输入样例:
在这里给出一组输入。例如:

Hello
world
结尾无空行
输出样例:
在这里给出相应的输出。例如:

Hello-world!
结尾无空行

str1=input()
str2=input()
print(str1,str2, sep='-', end='!') 

input输入,print指定end为!,sep指定-