Search Header Logo

List Basics

Authored by ASWINI D

Computers

University

Used 1+ times

List Basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which is correct way to create a list?

L1=10,20,30

L1=list(10,20,30)

L1=(10,20,30)

L1=[10,20,30]

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How will you create a empty list?

L1[]

L1=list()

L1=" "

L1=()

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider L1=["Arun",15,150.5]

what will be printed when you execute the statement
print(type(L1[0]))

<class 'list'>

<class 'str'>

<class 'int'>

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Consider L=[50,60,[10,20,[30,40]]]

Write a statement to access the element 30 using index operator

L[3]

L[2]

L[2][2]

L[2][2][0]

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

L=["Welcome", "KCTians"]

L[::-1] produces?

['KCTians', 'Welcome']

['KCTians']

['Welcome']

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output?


Players=["Sachin","Dhoni","Virat Kohli"]
for item in Players:
print(item[0],end="\t")

Sachin Dhoni Virat Kohli

Sachin

S D V

Error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Players=["Sachin","Dhoni","Virat Kohli"]

The statement Players[1:1:1] produces?

Dhoni

Sachin

[]

Virat Kohli

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?