输入输出练习
从键盘读入2个字符串,然后输出。提示使用print函数中的sep和end参数。
输入格式:
输出格式:
对每一组输入,在一行中输出,字符串间以‘-’间隔,结尾为‘!'。
输入样例:
在这里给出一组输入。例如:
Hello
world
输出样例:
在这里给出相应的输出。例如:
Hello-world!
first=input()
second=input()
print (first,second,sep='-',end='')
print('!')
小结:
sep函数:Print函数的一个参数,用来定义输出数据之间的间隔符号