KnowledgeBoat Logo
|

Computer Science

Assertion (A): The process of repeating a set of elements in a string is termed as replication.

Reasoning (R): Repetition allows us to repeat the given string using (*) operator along with a number that specifies the number of replications.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

Python String Manipulation

2 Likes

Answer

Both A and R are true and R is the correct explanation of A.

Explanation
In Python, the process of repeating a string multiple times is referred to as repetition or replication. This is done using the (*) operator, where a string is multiplied by an integer to create a new string that repeats the original string the specified number of times.

Answered By

1 Like


Related Questions