Computer Science
…………… function will always return tuple of 3 elements.
- index()
- split()
- partition()
- strip()
Python String Manipulation
2 Likes
Answer
partition()
Reason — The partition() function is used to split the given string using the specified separator and returns a tuple with three parts: substring before the separator, separator itself, a substring after the separator.
Answered By
3 Likes
Related Questions
Which method removes all the trailing whitespaces from the right of the string?
- tolower()
- upper()
- Istrip()
- rstrip()
To concatenate means to …………… .
- replicate
- join
- split
- multiply
What will be the output of the following code?
A = 'Virtual Reality' A.replace('Virtual', 'Augmented')- Virtual Augmented
- Reality Augmented
- Augmented Virtual
- Augmented Reality
What will be the output of the following?
print("ComputerScience".split("er", 2))- ["Computer", "Science"]
- ["Comput", "Science"]
- ["Comput", "erScience"]
- ["Comput", "er", "Science"]