Online Test-Lists

Description

Quiz on Online Test-Lists, created by Aparna Dhirde on 03/17/2020.
Aparna Dhirde
Quiz by Aparna Dhirde, updated more than 1 year ago
Aparna Dhirde
Created by Aparna Dhirde over 5 years ago
87
0
1 2 3 4 5 (0)

Resource summary

Question 1

Question
Slicing is used to extract a part of the list.
Answer
  • True
  • False

Question 2

Question
Single element is not treated as list.
Answer
  • True
  • False

Question 3

Question
List is enclosed in curly brackets.
Answer
  • True
  • False

Question 4

Question
Operator & concatenates one list to the end of other list.
Answer
  • True
  • False

Question 5

Question
Operator * repeats the content of a list by specified number of times.
Answer
  • True
  • False

Question 6

Question
Which of the following commands will create a list?
Answer
  • list1 = list()
  • list1 = []
  • list1 = list([1, 2, 3])
  • all of the mentioned

Question 7

Question
Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?
Answer
  • [2, 33, 222, 14]
  • Error
  • 25
  • [25, 14, 222, 33, 2]

Question 8

Question
Suppose list1 is [1, 3, 2], What is list1 * 2?
Answer
  • [2, 6, 4]
  • [1, 3, 2, 1, 3]
  • [1, 3, 2, 1, 3, 2]
  • [1, 3, 2, 3, 2, 1]

Question 9

Question
What will be the output of the following Python code? >>>"Welcome to Python".split()
Answer
  • [“Welcome”, “to”, “Python”]
  • (“Welcome”, “to”, “Python”)
  • {“Welcome”, “to”, “Python”}
  • “Welcome”, “to”, “Python”

Question 10

Question
To which of the following the “in” operator can be used to check if an item is in it?
Answer
  • Lists
  • Dictionary
  • Set
  • All of the mentioned
Show full summary Hide full summary

0 comments

There are no comments, be the first and leave one below:

Similar

Spanish Adjectives (Describing People)
Niat Habtemariam
Enzymes
daniel.praecox
Hitler's Rise to Power
hanalou
History of Psychology
mia.rigby
AQA - English Language Unit 1
Alice Love
Meteorologia I
Adriana Forero
Meteorologia II
Adriana Forero
The Skeleton and Muscles
james liew
Creating Mind Maps with GoConqr
Sarah Egan
1.11 Core Textiles
T Andrews