Answer to Question #227202 in Python for kaavya

Question #227202

First Letters

You are given three strings as input. Write a program to print the first character of each string.

Input

The first, second, and third lines of input are strings.

Explanation

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




1
Expert's answer
2021-08-18T11:19:31-0400
str1 = input()
str2 = input()
str3 = input()
print(str1[0], str2[0], str3[0], sep='')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS