(a) Given is a Python string declaration:
myexam="@@CBSE Examination [email protected]@"
Write the output of:
print(myexam[::-2])
Answer:
Output: @20 otnmx [email protected]
Explanation:
myexam[::-2] gives every second element of the string starting from the end of the string.
Get live Maths 1-on-1 Classs - Class 6 to 12