PYnative

Python Programming

  • Learn Python
  • Exercises
  • Quizzes
  • Code Editor
  • Tricks
Home » Python » Quizzes » Python List Quiz

Python List Quiz

Updated on: August 24, 2022 | 33 Comments

This Python list quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulation. To perform any programming tasks in Python, a good understanding of list operations is necessary.

Also, See: Python List Exercise.

  • This quiz contains 16 Questions. Solve 11 correct to pass the test.
  • You will have to read all the given answers and click over the correct answer.
  • Read the guide on Python Lists to solve this quiz.

1. What is the output of the following code

my_list = ["Hello", "Python"]
print("-".join(my_list))
 
 
 

2. What is the output of the following list function?

sampleList = [10, 20, 30, 40, 50]
sampleList.pop()
print(sampleList)

sampleList.pop(2)
print(sampleList)
 
 
 

3. What is the output of the following list comprehension

resList = [x+y for x in ['Hello ', 'Good '] for y in ['Dear', 'Bye']]
print(resList)
 
 

4. What is the output of the following code?

sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)
 
 
 

5. In Python, list is mutable

 
 

6. What is the output of the following

aList = [1, 2, 3, 4, 5, 6, 7]
pow2 =  [2 * x for x in aList]
print(pow2)
 
 

7. What is the output of the following code

aList = ["PYnative", [4, 8, 12, 16]]
print(aList[0][1])    
print(aList[1][3])
 
 
 

8. Select all the correct options to join two lists in Python

listOne  =  ['a', 'b', 'c', 'd']
listTwo =  ['e', 'f', 'g']
 
 
 
 

9. What is the output of the following list assignment

aList = [4, 8, 12, 16]
aList[1:4] = [20, 24, 28]
print(aList)
 
 

10. Select all the correct options to copy a list

aList = ['a', 'b', 'c', 'd']

 
 
 
 

11. What is the output of the following

l = [None] * 10
print(len(l))
 
 
 

12. What is the output of the following code

list1 = ['xyz', 'zara', 'PYnative']
print (max(list1))
 
 

13. What is the output of the following list operation

aList = [10, 20, 30, 40, 50, 60, 70, 80]
print(aList[2:5])
print(aList[:4])
print(aList[3:])
 
 

14. What is the output of the following list operation

sampleList = [10, 20, 30, 40, 50]
print(sampleList[-2])
print(sampleList[-4:-1])
 
 

15. What is the output of the following list function?

sampleList = [10, 20, 30, 40, 50]
sampleList.append(60)
print(sampleList)

sampleList.append(60)
print(sampleList)
 
 

16. What is the output of the following

aList = [5, 10, 15, 25]
print(aList[::-2])
 
 
 

Loading ... Loading …

Loading

Filed Under: Python, Python Basics, Python Quizzes

Did you find this page helpful? Let others know about it. Sharing helps me continue to create free Python resources.

TweetF  sharein  shareP  Pin

About Vishal

I’m Vishal Hule, Founder of PYnative.com. I am a Python developer, and I love to write articles to help students, developers, and learners. Follow me on Twitter

Related Tutorial Topics:

Python Python Basics Python Quizzes

Python Exercises and Quizzes

Free coding exercises and quizzes cover Python basics, data structure, data analytics, and more.

  • 15+ Topic-specific Exercises and Quizzes
  • Each Exercise contains 10 questions
  • Each Quiz contains 12-15 MCQ
Exercises
Quizzes

Posted In

Python Python Basics Python Quizzes
TweetF  sharein  shareP  Pin

  Python Quizzes

  • Python Quizzes Home
  • Basic Quiz For Beginners
  • Variables and Data Types Quiz
  • Operators and Expression Quiz
  • Input and Output Quiz
  • Functions Quiz
  • if else and loops Quiz
  • Numbers Quiz
  • String Quiz
  • List Quiz
  • Set Quiz
  • Dictionary Quiz
  • Tuple Quiz
  • File Handling Quiz
  • Random Data Generation Quiz

All Python Topics

Python Basics Python Exercises Python Quizzes Python File Handling Python OOP Python Date and Time Python Random Python Regex Python Pandas Python Databases Python MySQL Python PostgreSQL Python SQLite Python JSON

About PYnative

PYnative.com is for Python lovers. Here, You can get Tutorials, Exercises, and Quizzes to practice and improve your Python skills.

Explore Python

  • Learn Python
  • Python Basics
  • Python Databases
  • Python Exercises
  • Python Quizzes
  • Online Python Code Editor
  • Python Tricks

Follow Us

To get New Python Tutorials, Exercises, and Quizzes

  • Twitter
  • Facebook
  • Sitemap

Legal Stuff

  • About Us
  • Contact Us

We use cookies to improve your experience. While using PYnative, you agree to have read and accepted our Terms Of Use, Cookie Policy, and Privacy Policy.

Copyright © 2018–2023 pynative.com