Let us consider a string WORD = ‘PRACTICES’. What will be the output of the following statements? WORD [6] = ? WORD [- 3] = ?Let us consider a string WORD = ‘PRACTICES’. What will be the output of the following statements? WORD [6] = ? WORD [- 3] = ?
Answers
Answer:
Consider the following string mySubject:
mySubject = "Computer Science"
What will be the output of the following string operations:-
print(mySubject[0:len(mySubject)])
print(mySubject[-7:-1])
print(mySubject[::2])
print(mySubject[len(mySubject)-1])
print(2*mySubject)
print(mySubject[::-2])
print(mySubject[:3] + mySubject[3:])
print(mySubject.swapcase())
print(mySubject.startswith('Comp'))
print(mySubject.isalpha())
ANSWER:
The output of the given string operations are as follows:
Computer Science
Scienc
Cmue cec
e
Computer ScienceComputer Science
eniSrtpo
Computer Science
cOMPUTER sCIENCE
True
False
hope this helps u...
please brainliest my ans if they are helpful to you...
five thanks for your ans from me in return...
hv a nice day...
stay home stay safe...