Advertisements
Advertisements
Question
Consider the following string mySubject:
mySubject = "Computer Science"
What will be the output of the following string operation:
print(2*mySubject)
One Line Answer
Solution
Computer ScienceComputer Science
shaalaa.com
String Operators
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
Which of the following operator is used for concatenation?
Which of the following is the slicing operator?
What is stride?
The subscript of a string may be ______
What is slicing?
Explain string operators in python with suitable examples.
Consider the following string mySubject:
mySubject = "Computer Science"
What will be the output of the following string operation:
print(mySubject[:3] + mySubject[3:])
Consider the following string mySubject:
mySubject = "Computer Science"
What will be the output of the following string operation:
print(mySubject[:: -2])