Class 11 Exam  >  Class 11 Questions  >  Find the output of following: str1="wonderful... Start Learning for Free
Find the output of following: str1="wonderful"
(i) print(str1[0:6]),
(ii) print(str1[0:3]),
(iii) print(str1[3:6]),
(iv) print(str1[-1:-3]),
(v) print(str1[-3:-1])?
Most Upvoted Answer
Find the output of following: str1="wonderful" (i) print(str1[0:6]), (...
The number inside square bracket represents the position of a certain character in the given string. If there are two numbers seperated by a semi colon it means we have to print all the characters in between them including them. The first character is given the suffix 0, and then it goes on till the last.
(I) wonderf
(II) wond
(III) derf
If one the given number is negative it means we have to count from the last character. Example [-1] means the last but one character.
(IV) ufr
(IV) rfu
Community Answer
Find the output of following: str1="wonderful" (i) print(str1[0:6]), (...
Forward indexing
0 1 2 3 4 5 6 7 8
W o n d e r f u l
backward indexing
-9 -8 -7 -6 -5 -4 -3 -2 -1
W o n d e r f u l
(i) 0:6= elements from index 0 to index 5
Wonder
(ii) 0:3= elements from index 0 to index 2
Won
(iii) 3:6= elements from index 3 to index 5
der
(iv) -1:-3= element from index -1 to index -3
ufr
(v) -3:-1= element from index - 3 to - 1
rfu
Attention Class 11 Students!
To make sure you are not studying endlessly, EduRev has designed Class 11 study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Class 11.
Explore Courses for Class 11 exam

Top Courses for Class 11

Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])?
Question Description
Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? for Class 11 2024 is part of Class 11 preparation. The Question and answers have been prepared according to the Class 11 exam syllabus. Information about Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? covers all topics & solutions for Class 11 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])?.
Solutions for Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? in English & in Hindi are available as part of our courses for Class 11. Download more important topics, notes, lectures and mock test series for Class 11 Exam by signing up for free.
Here you can find the meaning of Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? defined & explained in the simplest way possible. Besides giving the explanation of Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])?, a detailed solution for Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? has been provided alongside types of Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? theory, EduRev gives you an ample number of questions to practice Find the output of following: str1="wonderful" (i) print(str1[0:6]), (ii) print(str1[0:3]), (iii) print(str1[3:6]), (iv) print(str1[-1:-3]), (v) print(str1[-3:-1])? tests, examples and also practice Class 11 tests.
Explore Courses for Class 11 exam

Top Courses for Class 11

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev