First Letters
You are given three strings as input. Write a program to print the first character of each string.
The first, second, and third lines of input are strings.
Consider the given strings to be
apple, banana, and carrot. We need to consider the first character in each of these strings. We get the character a from the first string apple, we get the character b from the second string banana, and we get the character c from the third string carrot. So the final output should be abc.
Sample Input 1
apple
banana
carrot
Sample Output 1
abc
Sample Input 2
Very
Important
Person
Sample Output 2
VIP
str1 = input()
str2 = input()
str3 = input()
print(str1[0], str2[0], str3[0], sep='')
Comments
Leave a comment