Computer Science

You have the following code segment :

String1 = "my"
String2 = "work"
print(String1 + String2)

What is the output of this code?

  1. my work
  2. work
  3. mywork
  4. my

Python String Manipulation

2 Likes

Answer

Output
mywork

Reason — The + operator creates a new string by joining the two operand strings.

Answered By

2 Likes


Related Questions