Computer Science
What is the output of the following code?
t = (10, 20, 30, 40, 50, 60, 70)
print(t[5:-1])
- Blank output( )
- (10, 20, 30, 40, 50)
- (10, 30, 50, 70)
- (10, 20, 30, 40, 50, 60, 70)
Related Questions
Given tp = (5,3,1,9,0). Which of the following two statements will give the same output?
(i) print( tp[:-1] )
(ii) print( tp[0:5] )
(iii) print( tp[0:4] )
(iv) print( tp[-4:] )- (i), (ii)
- (ii), (iv)
- (i), (iv)
- (i), (iii)
What is the output of the following code ?
t = (10, 20, 30, 40, 50, 50, 70) print(t[5:-1])
- Blank output( )
- (50,70)
- (50,50,70)
- (50,)
Which of the below given functions cannot be used with nested tuples ?
- index( )
- count( )
- max( )
- sum( )
Fill in the blanks:
Tuples are _________ data types of Python.