What will be the output of the code given below:

ICSE Class 10 Robotics & AI PYQ · 2025 Specimen · Section A

2(x)1 Mark · 2025 · Section A · 2025 Specimen

What will be the output of the code given below:

text = "Python Programming" 
print(text[7:])
Show SolutionHide Solution↓
Programming

In Python, if the ending index is not mentioned in string slicing, the slice returns characters from the starting index up to the end of the string. Here, text[7:] starts from index 7 and returns all characters till the end, resulting in Programming.

← Previous questionNext question →

Browse the free Robotics & AI sample bank