KnowledgeBoat Logo
|
LoginJOIN NOW

Computer Science

In Python string, + and * represent which of the following operations?

  1. Concatenation, Replication
  2. Addition, Multiplication
  3. Neither (i) nor (ii)
  4. Both (i) and (ii)

Python String Manipulation

2 Likes

Answer

Concatenation, Replication

Reason — In Python strings, the + operator is used for concatenation, which means combining two strings into one. The * operator is used for replication, which means repeating the string a specified number of times.

Answered By

3 Likes


Related Questions