Computer Science
Observe the given code and select the appropriate output.
Tuple given: tup1 = (10, 20, 30, 40, 50, 60, 70, 80, 90)
What will be the output of: print(tup1[3:7:2])
- (40, 50, 60, 70, 80)
- (40, 50, 60, 70)
- (40, 60)
- Error
Related Questions
Find the output of the following:
for i in range(20, 30, 2): print (i)
- 1.
21 22 23 24 25
- 2.
21 23 25 27 29
3. SyntaxError
4.20 22 24 26 28
Which of the following functions will return the first three characters of a string named 's'?
- s[3:]
- s[:3]
- s[-3:]
- s[:-3]
Select the correct output of the following string operators.
str1='One' print(str1[:3] + 'Two' + str1[-3:])
- OneOneTwo
- TwoOneOne
- OneTwoOne
- Error
When a list is contained in another list as a member-element, it is called …………… .
- Nested tuple
- Nested list
- Array
- List