GradeVision
Home
Blog
Quiz
Python
JavaScript
About
Contact
Python Quiz set 2 List and tupple
Posted by admin at April 25, 2020
Consider the tuple tuple1=("A","B","C" ), what is the result of the following operation tuple1[-1]?
A
C
B
Correct!
Wrong!
Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[1]:
((11,12),[21,22])
[21,22]
(11,12)
Correct!
Wrong!
Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[0][1]:
21
12
11
Correct!
Wrong!
What is the result of the following operation: 'A,B,C,D'.split(',')
[A,B,C,D]
(A,B,C,D)
A,B,C,D
Correct!
Wrong!
After applying the following method, L.append(['a','b']), the following list will only be one element longer.
True
False
Correct!
Wrong!
What is the result of the following operation in Python: 3 + 2 * 2
10
7
8
6
Correct!
Wrong!
lists are mutable
True
False
Correct!
Wrong!
consider the following list : A=["hard rock",10,1.2] what will list A contain after the following command is run: del(A[1])
["hard rock",1.2]
[10,1.2]
["hard rock",10]
Correct!
Wrong!
what is the syntax to clone the list A and assign the result to list B
B = A
B = A[:]
Correct!
Wrong!
what is the result of the following: len(("disco",10,1.2, "hard rock",10))
5
0
6
Correct!
Wrong!
List and Tuples
Awesome
Author
admin
View all posts
Share this:
Tweet
Related
«
Linux Partitions and Filesystems
Working with Jupyter Notebook and Python
»
Comments
Write a Reply or Comment
Cancel reply
You must be
logged in
to post a comment.
Search for:
Recent Posts
Real Analysis
VSCODE Shortcut keys.
OUR INDIAN MUSIC : STORIES AND ANECDOTES
What Is a File Extension?
Mathematical Ability Questions.
What is BODMAS?
Categories
Categories
Select Category
Algorithms
basic Computer
C Programing
CCC
CGL
Chemistry
CSS
data structure
General Knowledge
Github
HTML
IBPS PO
Indian Railways
Java
JavaScript
Learn
Linux
Logical Reasoning and Data Interpretation
Math
Mobile Computing
NodeJS
Operating System
Pari Ek Pahachan
poetry(The voice of heart)
Python
Quantitative Aptitude
Quiz
IQ Test
Math Quiz
React
SBI PO
Shell
SSC
Story
Test Assessment
Elitmus
Verbal Ability
Comments