Search Header Logo
list in python

list in python

Assessment

Presentation

Computers

11th Grade

Hard

Created by

NISHA SHARMA

Used 58+ times

FREE Resource

1 Slide • 10 Questions

1

list in python

Slide image

2

Multiple Choice

what is the output when we execute list("hello")?

1

['h','e','l','l','o']

2

['hello']

3

'hello'

4

"hello"

3

Multiple Choice

what is the output of the following code?

l=[None]*10

print(len(l))

1

10

2

0

3

syntax error

4

None

4

Multiple Choice

Consider the list aList=["LFPS",[1,3,5,7]]

What would the following code print?

print(aList[0][1],aList[1][1])

1

L,3

2

L,1

3

F,3

4

F,1

5

Fill in the Blank

Which function or method can add only one value to a list?

6

Fill in the Blank

which of the following will always return a list?

7

Fill in the Blank

Which function delete an element from a list ,if its value is given?

8

Fill in the Blank

____removes all the elements of a list.

9

Multiple Choice

which of the following will return the last element of a list L with 5 elements?

1

L[5]

2

L[6-1]

3

L[-1]

4

L[6]

10

Multiple Choice

Given a list L=[10,20,30,40,50,60,70],What would L[2:-2] return?

1

[10,20,30,40]

2

[20,30,40,50]

3

[20,30,40]

4

[30,40,50]

11

Multiple Choice

what is printed by the following python statement-

print(list(range(3)))

1

[0,1,2,3]

2

[1,2,3]

3

[0,1,2]

4

0,1,2

list in python

Slide image

Show answer

Auto Play

Slide 1 / 11

SLIDE