Python Programming - Variables - Discussion

Discussion Forum : Variables - General Questions (Q.No. 16)
16.
What is the output of the following code:
x = "Hello"
y = "IndiaBIX"
print(y + x)
IndiaBIXHello
IndiaBIX Hello
HelloIndiaBIX
Hello IndiaBIX
Answer: Option
Explanation:

In Python, the + operator can be used to concatenate strings.

In this case, the variables x and y hold the strings "Hello" and "IndiaBIX", respectively.

When they are concatenated with the + operator, the result y+x is "IndiaBIXHello".

Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.