Input Combination
by CodeChum Admin
We’ve tried adding together integers, so how about adding characters as well? Well we really don't know how to create a variable that holds the combined characters (at least for now) so let's just print them together in 1 string instead.
Instructions:
Input two characters in one line, separated by a space.
Make the strings be printed out like it’s concatenated (or combined) by printing it without spaces in between. Refer to the sample output for your reference.
Input
A line containing two characters separated by a space.
A·B
Output
A line containing two characters.
AB
line = input()
ch1, ch2 = line.split()
res = ch1 + ch2
print(res)
Comments
Leave a comment