{"id":5955,"date":"2020-02-23T16:43:02","date_gmt":"2020-02-23T11:13:02","guid":{"rendered":"https:\/\/pynative.com\/?p=5955"},"modified":"2025-08-26T12:08:26","modified_gmt":"2025-08-26T06:38:26","slug":"python-list-quiz","status":"publish","type":"post","link":"https:\/\/pynative.com\/python-list-quiz\/","title":{"rendered":"Python List Quiz"},"content":{"rendered":"\n<p>This Python list quiz provides Multiple Choice Questions(<strong>MCQs<\/strong>) to <strong>test your understanding of Python lists<\/strong>, from basic creation and access to more advanced manipulation techniques. <\/p>\n\n\n\n<p>Each Multiple Choice Question (MCQ) comes with a clear explanation for its answer, helping you to understand why it&#8217;s correct. The quiz covers questions on the below topics.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>List fundamentals<\/strong>: How to create, access elements (including positive and negative indexing), and understand mutability.<\/li>\n\n\n\n<li><strong>Common list operations<\/strong>: Adding, removing, modifying, and searching for elements.<\/li>\n\n\n\n<li><strong>List methods<\/strong>: Utilizing powerful built-in methods like <code>append()<\/code>, <code>extend()<\/code>, <code>insert()<\/code>, <code>pop()<\/code>, <code>remove()<\/code>, <code>sort()<\/code>, and <code>reverse()<\/code>.<\/li>\n\n\n\n<li><strong>List slicing<\/strong>: Extracting sub-lists efficiently.<\/li>\n\n\n\n<li><strong>List comprehensions<\/strong>: A concise way to create lists.<\/li>\n<\/ul>\n\n\n\n<p>Whether you&#8217;re a beginner solidifying your foundational skills or an intermediate programmer looking to sharpen your list manipulation expertise, this quiz provides an excellent opportunity for practice and self-assessment. <\/p>\n\n\n\n<div class=\"wp-block-columns has-black-color has-text-color has-background is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\" style=\"background-color:#fff7ed\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Also, See<\/strong>: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>15 <a href=\"https:\/\/pynative.com\/python\/quizzes\/\">Python Quizzes<\/a><\/strong>: each focusing on a specific topic<\/li>\n\n\n\n<li><a href=\"https:\/\/pynative.com\/python-list-exercise-with-solutions\/\"><strong>Python List Exercise<\/strong><\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The quiz contains&nbsp;<strong>25 questions.&nbsp;<\/strong>There is no time limit.<\/li>\n\n\n\n<li>Explanation is provided for each answer.<\/li>\n\n\n\n<li>You will get 1 point for each correct answer.&nbsp;<strong>Solve 15&nbsp;correctly to pass the test<\/strong><\/li>\n\n\n\n<li>Read the <strong>guide on <a href=\"https:\/\/pynative.com\/python-lists\/\">Python Lists<\/a><\/strong> to solve this quiz.<\/li>\n<\/ul>\n\n\n<div id=\"watu_quiz\" class=\"quiz-area single-page-quiz\">\n<form action=\"\" method=\"post\" class=\"quiz-form \" id=\"quiz-7\" >\n<div class='watu-question' id='question-1'><div class='question-content'><p><span class='watu_num'>1. <\/span><strong>What will be the output of the following code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">my_list = [\"Hello\", \"Python\"]\r\nprint(\"-\".join(my_list))<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='75' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3673' \/><div class='watu-question-choice'><input type='radio' name='answer-75[]' id='answer-id-3673' class='answer answer-1  answerof-75' value='3673' \/>&nbsp;<label for='answer-id-3673' id='answer-label-3673' class=' answer label-1'><span class='answer'>HelloPython-<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3674' \/><div class='watu-question-choice'><input type='radio' name='answer-75[]' id='answer-id-3674' class='answer answer-1  answerof-75' value='3674' \/>&nbsp;<label for='answer-id-3674' id='answer-label-3674' class=' answer label-1'><span class='answer'>Hello-Python<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3675' \/><div class='watu-question-choice'><input type='radio' name='answer-75[]' id='answer-id-3675' class='answer answer-1  answerof-75' value='3675' \/>&nbsp;<label for='answer-id-3675' id='answer-label-3675' class=' answer label-1'><span class='answer'>-HelloPython<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType1' value='radio' class=''><\/div><div class='watu-question' id='question-2'><div class='question-content'><p><span class='watu_num'>2. <\/span><strong>Which method modifies a list by reversing its elements in place (without creating a new list)?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='487' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3566' \/><div class='watu-question-choice'><input type='radio' name='answer-487[]' id='answer-id-3566' class='answer answer-2  answerof-487' value='3566' \/>&nbsp;<label for='answer-id-3566' id='answer-label-3566' class=' answer label-2'><span class='answer'><code>list.reversed()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3567' \/><div class='watu-question-choice'><input type='radio' name='answer-487[]' id='answer-id-3567' class='answer answer-2  answerof-487' value='3567' \/>&nbsp;<label for='answer-id-3567' id='answer-label-3567' class=' answer label-2'><span class='answer'> <code>list.reverse()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3568' \/><div class='watu-question-choice'><input type='radio' name='answer-487[]' id='answer-id-3568' class='answer answer-2  answerof-487' value='3568' \/>&nbsp;<label for='answer-id-3568' id='answer-label-3568' class=' answer label-2'><span class='answer'><code>list.sort(reverse=True)<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3569' \/><div class='watu-question-choice'><input type='radio' name='answer-487[]' id='answer-id-3569' class='answer answer-2  answerof-487' value='3569' \/>&nbsp;<label for='answer-id-3569' id='answer-label-3569' class=' answer label-2'><span class='answer'><code>list[::-1]<\/code><\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType2' value='radio' class=''><\/div><div class='watu-question' id='question-3'><div class='question-content'><p><span class='watu_num'>3. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">list1 = [1, 2, 3]\r\nlist2 = list1\r\nlist2.append(4)\r\nprint(list1)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='502' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3626' \/><div class='watu-question-choice'><input type='radio' name='answer-502[]' id='answer-id-3626' class='answer answer-3  answerof-502' value='3626' \/>&nbsp;<label for='answer-id-3626' id='answer-label-3626' class=' answer label-3'><span class='answer'>[1, 2, 3] <\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3627' \/><div class='watu-question-choice'><input type='radio' name='answer-502[]' id='answer-id-3627' class='answer answer-3  answerof-502' value='3627' \/>&nbsp;<label for='answer-id-3627' id='answer-label-3627' class=' answer label-3'><span class='answer'>[1, 2, 3, 4]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3628' \/><div class='watu-question-choice'><input type='radio' name='answer-502[]' id='answer-id-3628' class='answer answer-3  answerof-502' value='3628' \/>&nbsp;<label for='answer-id-3628' id='answer-label-3628' class=' answer label-3'><span class='answer'>[4]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3629' \/><div class='watu-question-choice'><input type='radio' name='answer-502[]' id='answer-id-3629' class='answer answer-3  answerof-502' value='3629' \/>&nbsp;<label for='answer-id-3629' id='answer-label-3629' class=' answer label-3'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType3' value='radio' class=''><\/div><div class='watu-question' id='question-4'><div class='question-content'><p><span class='watu_num'>4. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">matrix = [[1, 2], [3, 4]]\r\ncopied_matrix = matrix[:]\r\ncopied_matrix[0][0] = 99\r\nprint(matrix[0][0])<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='484' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3554' \/><div class='watu-question-choice'><input type='radio' name='answer-484[]' id='answer-id-3554' class='answer answer-4  answerof-484' value='3554' \/>&nbsp;<label for='answer-id-3554' id='answer-label-3554' class=' answer label-4'><span class='answer'>1<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3555' \/><div class='watu-question-choice'><input type='radio' name='answer-484[]' id='answer-id-3555' class='answer answer-4  answerof-484' value='3555' \/>&nbsp;<label for='answer-id-3555' id='answer-label-3555' class=' answer label-4'><span class='answer'>99<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3556' \/><div class='watu-question-choice'><input type='radio' name='answer-484[]' id='answer-id-3556' class='answer answer-4  answerof-484' value='3556' \/>&nbsp;<label for='answer-id-3556' id='answer-label-3556' class=' answer label-4'><span class='answer'>[[99, 2], [3, 4]]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3557' \/><div class='watu-question-choice'><input type='radio' name='answer-484[]' id='answer-id-3557' class='answer answer-4  answerof-484' value='3557' \/>&nbsp;<label for='answer-id-3557' id='answer-label-3557' class=' answer label-4'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType4' value='radio' class=''><\/div><div class='watu-question' id='question-5'><div class='question-content'><p><span class='watu_num'>5. <\/span><strong>What will be the output of the following code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">aList = [5, 10, 15, 25]\r\nprint(aList[::-2])<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='76' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3676' \/><div class='watu-question-choice'><input type='radio' name='answer-76[]' id='answer-id-3676' class='answer answer-5  answerof-76' value='3676' \/>&nbsp;<label for='answer-id-3676' id='answer-label-3676' class=' answer label-5'><span class='answer'>[15, 10, 5]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3677' \/><div class='watu-question-choice'><input type='radio' name='answer-76[]' id='answer-id-3677' class='answer answer-5  answerof-76' value='3677' \/>&nbsp;<label for='answer-id-3677' id='answer-label-3677' class=' answer label-5'><span class='answer'>[10, 5]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3678' \/><div class='watu-question-choice'><input type='radio' name='answer-76[]' id='answer-id-3678' class='answer answer-5  answerof-76' value='3678' \/>&nbsp;<label for='answer-id-3678' id='answer-label-3678' class=' answer label-5'><span class='answer'>[25, 10]<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType5' value='radio' class=''><\/div><div class='watu-question' id='question-6'><div class='question-content'><p><span class='watu_num'>6. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">nums = [1, 2, 3, 2, 1]\r\nprint(nums.count(2))\r\nprint(nums.index(1))<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='494' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3594' \/><div class='watu-question-choice'><input type='radio' name='answer-494[]' id='answer-id-3594' class='answer answer-6  answerof-494' value='3594' \/>&nbsp;<label for='answer-id-3594' id='answer-label-3594' class=' answer label-6'><span class='answer'>2<br \/>\n1<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3595' \/><div class='watu-question-choice'><input type='radio' name='answer-494[]' id='answer-id-3595' class='answer answer-6  answerof-494' value='3595' \/>&nbsp;<label for='answer-id-3595' id='answer-label-3595' class=' answer label-6'><span class='answer'>2<br \/>\n0<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3596' \/><div class='watu-question-choice'><input type='radio' name='answer-494[]' id='answer-id-3596' class='answer answer-6  answerof-494' value='3596' \/>&nbsp;<label for='answer-id-3596' id='answer-label-3596' class=' answer label-6'><span class='answer'>1<br \/>\n0<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3597' \/><div class='watu-question-choice'><input type='radio' name='answer-494[]' id='answer-id-3597' class='answer answer-6  answerof-494' value='3597' \/>&nbsp;<label for='answer-id-3597' id='answer-label-3597' class=' answer label-6'><span class='answer'>1<br \/>\n1<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType6' value='radio' class=''><\/div><div class='watu-question' id='question-7'><div class='question-content'><p><span class='watu_num'>7. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">my_list = [1, 2, 3]\r\nmy_list.append([4, 5])\r\nprint(len(my_list))<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='478' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3530' \/><div class='watu-question-choice'><input type='radio' name='answer-478[]' id='answer-id-3530' class='answer answer-7  answerof-478' value='3530' \/>&nbsp;<label for='answer-id-3530' id='answer-label-3530' class=' answer label-7'><span class='answer'>3<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3531' \/><div class='watu-question-choice'><input type='radio' name='answer-478[]' id='answer-id-3531' class='answer answer-7  answerof-478' value='3531' \/>&nbsp;<label for='answer-id-3531' id='answer-label-3531' class=' answer label-7'><span class='answer'>4<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3532' \/><div class='watu-question-choice'><input type='radio' name='answer-478[]' id='answer-id-3532' class='answer answer-7  answerof-478' value='3532' \/>&nbsp;<label for='answer-id-3532' id='answer-label-3532' class=' answer label-7'><span class='answer'>5<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3533' \/><div class='watu-question-choice'><input type='radio' name='answer-478[]' id='answer-id-3533' class='answer answer-7  answerof-478' value='3533' \/>&nbsp;<label for='answer-id-3533' id='answer-label-3533' class=' answer label-7'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType7' value='radio' class=''><\/div><div class='watu-question' id='question-8'><div class='question-content'><p><span class='watu_num'>8. <\/span><strong>What is the difference between <code>list.append(item)<\/code> and <code>list.extend(iterable)<\/code>?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='477' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3526' \/><div class='watu-question-choice'><input type='radio' name='answer-477[]' id='answer-id-3526' class='answer answer-8  answerof-477' value='3526' \/>&nbsp;<label for='answer-id-3526' id='answer-label-3526' class=' answer label-8'><span class='answer'><code>append()<\/code> adds an item to the end, extend() adds multiple items as a single element.<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3527' \/><div class='watu-question-choice'><input type='radio' name='answer-477[]' id='answer-id-3527' class='answer answer-8  answerof-477' value='3527' \/>&nbsp;<label for='answer-id-3527' id='answer-label-3527' class=' answer label-8'><span class='answer'><code>append()<\/code> adds a single item, extend() adds all items from an iterable.<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3528' \/><div class='watu-question-choice'><input type='radio' name='answer-477[]' id='answer-id-3528' class='answer answer-8  answerof-477' value='3528' \/>&nbsp;<label for='answer-id-3528' id='answer-label-3528' class=' answer label-8'><span class='answer'><code>append()<\/code> modifies the original list, extend() returns a new list.<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3529' \/><div class='watu-question-choice'><input type='radio' name='answer-477[]' id='answer-id-3529' class='answer answer-8  answerof-477' value='3529' \/>&nbsp;<label for='answer-id-3529' id='answer-label-3529' class=' answer label-8'><span class='answer'><code>append()<\/code> is faster for large datasets, extend() is slower.<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType8' value='radio' class=''><\/div><div class='watu-question' id='question-9'><div class='question-content'><p><span class='watu_num'>9. <\/span><strong>Select all the correct options to copy a list <code>aList = ['a', 'b', 'c', 'd'<\/code>]<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='69' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3686' \/><div class='watu-question-choice'><input type='radio' name='answer-69[]' id='answer-id-3686' class='answer answer-9  answerof-69' value='3686' \/>&nbsp;<label for='answer-id-3686' id='answer-label-3686' class=' answer label-9'><span class='answer'><code>newList = aList.copy()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3687' \/><div class='watu-question-choice'><input type='radio' name='answer-69[]' id='answer-id-3687' class='answer answer-9  answerof-69' value='3687' \/>&nbsp;<label for='answer-id-3687' id='answer-label-3687' class=' answer label-9'><span class='answer'><code>newList = list(aList)<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3688' \/><div class='watu-question-choice'><input type='radio' name='answer-69[]' id='answer-id-3688' class='answer answer-9  answerof-69' value='3688' \/>&nbsp;<label for='answer-id-3688' id='answer-label-3688' class=' answer label-9'><span class='answer'>All of the above<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType9' value='radio' class=''><\/div><div class='watu-question' id='question-10'><div class='question-content'><p><span class='watu_num'>10. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">items = [\"apple\", \"banana\", \"cherry\"]\r\nindex_to_remove = items.index(\"banana\")\r\nremoved_item = items.pop(index_to_remove)\r\nprint(removed_item)\r\nprint(items)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='500' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3618' \/><div class='watu-question-choice'><input type='radio' name='answer-500[]' id='answer-id-3618' class='answer answer-10  answerof-500' value='3618' \/>&nbsp;<label for='answer-id-3618' id='answer-label-3618' class=' answer label-10'><span class='answer'>banana<br \/>\n[&#8216;apple&#8217;, &#8216;cherry&#8217;]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3619' \/><div class='watu-question-choice'><input type='radio' name='answer-500[]' id='answer-id-3619' class='answer answer-10  answerof-500' value='3619' \/>&nbsp;<label for='answer-id-3619' id='answer-label-3619' class=' answer label-10'><span class='answer'>banana<br \/>\n[&#8216;apple&#8217;, &#8216;banana&#8217;, &#8216;cherry&#8217;]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3620' \/><div class='watu-question-choice'><input type='radio' name='answer-500[]' id='answer-id-3620' class='answer answer-10  answerof-500' value='3620' \/>&nbsp;<label for='answer-id-3620' id='answer-label-3620' class=' answer label-10'><span class='answer'>[&#8216;apple&#8217;, &#8216;cherry&#8217;]<br \/>\nbanana<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3621' \/><div class='watu-question-choice'><input type='radio' name='answer-500[]' id='answer-id-3621' class='answer answer-10  answerof-500' value='3621' \/>&nbsp;<label for='answer-id-3621' id='answer-label-3621' class=' answer label-10'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType10' value='radio' class=''><\/div><div class='watu-question' id='question-11'><div class='question-content'><p><span class='watu_num'>11. <\/span><strong>Which operator is used to concatenate two lists (create a new list by joining them)?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='497' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3606' \/><div class='watu-question-choice'><input type='radio' name='answer-497[]' id='answer-id-3606' class='answer answer-11  answerof-497' value='3606' \/>&nbsp;<label for='answer-id-3606' id='answer-label-3606' class=' answer label-11'><span class='answer'><code>*<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3607' \/><div class='watu-question-choice'><input type='radio' name='answer-497[]' id='answer-id-3607' class='answer answer-11  answerof-497' value='3607' \/>&nbsp;<label for='answer-id-3607' id='answer-label-3607' class=' answer label-11'><span class='answer'><code>+<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3608' \/><div class='watu-question-choice'><input type='radio' name='answer-497[]' id='answer-id-3608' class='answer answer-11  answerof-497' value='3608' \/>&nbsp;<label for='answer-id-3608' id='answer-label-3608' class=' answer label-11'><span class='answer'><code>&amp;<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3609' \/><div class='watu-question-choice'><input type='radio' name='answer-497[]' id='answer-id-3609' class='answer answer-11  answerof-497' value='3609' \/>&nbsp;<label for='answer-id-3609' id='answer-label-3609' class=' answer label-11'><span class='answer'><code>|<\/code><\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType11' value='radio' class=''><\/div><div class='watu-question' id='question-12'><div class='question-content'><p><span class='watu_num'>12. <\/span><strong>What will be the output of the following list operation?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">sampleList = [10, 20, 30, 40, 50]\r\nprint(sampleList[-2])\r\nprint(sampleList[-4:-1])<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='64' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3648' \/><div class='watu-question-choice'><input type='radio' name='answer-64[]' id='answer-id-3648' class='answer answer-12  answerof-64' value='3648' \/>&nbsp;<label for='answer-id-3648' id='answer-label-3648' class=' answer label-12'><span class='answer'>40<br \/>\n[20, 30, 40]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3649' \/><div class='watu-question-choice'><input type='radio' name='answer-64[]' id='answer-id-3649' class='answer answer-12  answerof-64' value='3649' \/>&nbsp;<label for='answer-id-3649' id='answer-label-3649' class=' answer label-12'><span class='answer'>IndexError: list index out of range<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType12' value='radio' class=''><\/div><div class='watu-question' id='question-13'><div class='question-content'><p><span class='watu_num'>13. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">values = [10, 20, 30, 40, 50]\r\nprint(values[::2])<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='496' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3602' \/><div class='watu-question-choice'><input type='radio' name='answer-496[]' id='answer-id-3602' class='answer answer-13  answerof-496' value='3602' \/>&nbsp;<label for='answer-id-3602' id='answer-label-3602' class=' answer label-13'><span class='answer'>[10, 30, 50]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3603' \/><div class='watu-question-choice'><input type='radio' name='answer-496[]' id='answer-id-3603' class='answer answer-13  answerof-496' value='3603' \/>&nbsp;<label for='answer-id-3603' id='answer-label-3603' class=' answer label-13'><span class='answer'>[20, 40]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3604' \/><div class='watu-question-choice'><input type='radio' name='answer-496[]' id='answer-id-3604' class='answer answer-13  answerof-496' value='3604' \/>&nbsp;<label for='answer-id-3604' id='answer-label-3604' class=' answer label-13'><span class='answer'>[50, 30, 10]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3605' \/><div class='watu-question-choice'><input type='radio' name='answer-496[]' id='answer-id-3605' class='answer answer-13  answerof-496' value='3605' \/>&nbsp;<label for='answer-id-3605' id='answer-label-3605' class=' answer label-13'><span class='answer'>[10, 20, 30, 40, 50]<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType13' value='radio' class=''><\/div><div class='watu-question' id='question-14'><div class='question-content'><p><span class='watu_num'>14. <\/span><strong>What will be the output of the following code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">aList = [1, 2, 3, 4, 5, 6, 7]\r\npow2 =  [2 * x for x in aList]\r\nprint(pow2)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='72' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3669' \/><div class='watu-question-choice'><input type='radio' name='answer-72[]' id='answer-id-3669' class='answer answer-14  answerof-72' value='3669' \/>&nbsp;<label for='answer-id-3669' id='answer-label-3669' class=' answer label-14'><span class='answer'>[2, 4, 6, 8, 10, 12, 14]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3670' \/><div class='watu-question-choice'><input type='radio' name='answer-72[]' id='answer-id-3670' class='answer answer-14  answerof-72' value='3670' \/>&nbsp;<label for='answer-id-3670' id='answer-label-3670' class=' answer label-14'><span class='answer'>[2, 4, 8, 16, 32, 64, 128]<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType14' value='radio' class=''><\/div><div class='watu-question' id='question-15'><div class='question-content'><p><span class='watu_num'>15. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">numbers = [10, 20, 30, 40]\r\ndel numbers[1]\r\nnumbers.remove(40)\r\nprint(numbers)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='480' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3538' \/><div class='watu-question-choice'><input type='radio' name='answer-480[]' id='answer-id-3538' class='answer answer-15  answerof-480' value='3538' \/>&nbsp;<label for='answer-id-3538' id='answer-label-3538' class=' answer label-15'><span class='answer'>[10, 30]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3539' \/><div class='watu-question-choice'><input type='radio' name='answer-480[]' id='answer-id-3539' class='answer answer-15  answerof-480' value='3539' \/>&nbsp;<label for='answer-id-3539' id='answer-label-3539' class=' answer label-15'><span class='answer'>[20, 30]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3540' \/><div class='watu-question-choice'><input type='radio' name='answer-480[]' id='answer-id-3540' class='answer answer-15  answerof-480' value='3540' \/>&nbsp;<label for='answer-id-3540' id='answer-label-3540' class=' answer label-15'><span class='answer'>[10, 20]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3541' \/><div class='watu-question-choice'><input type='radio' name='answer-480[]' id='answer-id-3541' class='answer answer-15  answerof-480' value='3541' \/>&nbsp;<label for='answer-id-3541' id='answer-label-3541' class=' answer label-15'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType15' value='radio' class=''><\/div><div class='watu-question' id='question-16'><div class='question-content'><p><span class='watu_num'>16. <\/span><strong>Given <code>items = ['a', 'b', 'c', 'd']<\/code>, what does <code>items[-2]<\/code> return?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='495' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3598' \/><div class='watu-question-choice'><input type='radio' name='answer-495[]' id='answer-id-3598' class='answer answer-16  answerof-495' value='3598' \/>&nbsp;<label for='answer-id-3598' id='answer-label-3598' class=' answer label-16'><span class='answer'>&#8216;a&#8217;<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3599' \/><div class='watu-question-choice'><input type='radio' name='answer-495[]' id='answer-id-3599' class='answer answer-16  answerof-495' value='3599' \/>&nbsp;<label for='answer-id-3599' id='answer-label-3599' class=' answer label-16'><span class='answer'>&#8216;b&#8217;<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3600' \/><div class='watu-question-choice'><input type='radio' name='answer-495[]' id='answer-id-3600' class='answer answer-16  answerof-495' value='3600' \/>&nbsp;<label for='answer-id-3600' id='answer-label-3600' class=' answer label-16'><span class='answer'>&#8216;c&#8217;<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3601' \/><div class='watu-question-choice'><input type='radio' name='answer-495[]' id='answer-id-3601' class='answer answer-16  answerof-495' value='3601' \/>&nbsp;<label for='answer-id-3601' id='answer-label-3601' class=' answer label-16'><span class='answer'>&#8216;d&#8217;<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType16' value='radio' class=''><\/div><div class='watu-question' id='question-17'><div class='question-content'><p><span class='watu_num'>17. <\/span><strong>Which method removes a specified item from a list, raising an error if the item is not found?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='479' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3534' \/><div class='watu-question-choice'><input type='radio' name='answer-479[]' id='answer-id-3534' class='answer answer-17  answerof-479' value='3534' \/>&nbsp;<label for='answer-id-3534' id='answer-label-3534' class=' answer label-17'><span class='answer'><code>list.pop()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3535' \/><div class='watu-question-choice'><input type='radio' name='answer-479[]' id='answer-id-3535' class='answer answer-17  answerof-479' value='3535' \/>&nbsp;<label for='answer-id-3535' id='answer-label-3535' class=' answer label-17'><span class='answer'><code>list.delete()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3536' \/><div class='watu-question-choice'><input type='radio' name='answer-479[]' id='answer-id-3536' class='answer answer-17  answerof-479' value='3536' \/>&nbsp;<label for='answer-id-3536' id='answer-label-3536' class=' answer label-17'><span class='answer'><code>list.remove()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3537' \/><div class='watu-question-choice'><input type='radio' name='answer-479[]' id='answer-id-3537' class='answer answer-17  answerof-479' value='3537' \/>&nbsp;<label for='answer-id-3537' id='answer-label-3537' class=' answer label-17'><span class='answer'><code>list.discard()<\/code><\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType17' value='radio' class=''><\/div><div class='watu-question' id='question-18'><div class='question-content'><p><span class='watu_num'>18. <\/span><strong>To get a new sorted list from an existing list <code>original_list<\/code> without modifying <code>original_list<\/code>, which function should you use?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='489' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3574' \/><div class='watu-question-choice'><input type='radio' name='answer-489[]' id='answer-id-3574' class='answer answer-18  answerof-489' value='3574' \/>&nbsp;<label for='answer-id-3574' id='answer-label-3574' class=' answer label-18'><span class='answer'><code>original_list.sort()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3575' \/><div class='watu-question-choice'><input type='radio' name='answer-489[]' id='answer-id-3575' class='answer answer-18  answerof-489' value='3575' \/>&nbsp;<label for='answer-id-3575' id='answer-label-3575' class=' answer label-18'><span class='answer'><code>sorted(original_list)<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3576' \/><div class='watu-question-choice'><input type='radio' name='answer-489[]' id='answer-id-3576' class='answer answer-18  answerof-489' value='3576' \/>&nbsp;<label for='answer-id-3576' id='answer-label-3576' class=' answer label-18'><span class='answer'><code>original_list.copy().sort()<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3577' \/><div class='watu-question-choice'><input type='radio' name='answer-489[]' id='answer-id-3577' class='answer answer-18  answerof-489' value='3577' \/>&nbsp;<label for='answer-id-3577' id='answer-label-3577' class=' answer label-18'><span class='answer'><code>original_list.order()<\/code><\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType18' value='radio' class=''><\/div><div class='watu-question' id='question-19'><div class='question-content'><p><span class='watu_num'>19. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">letters = ['a', 'b', 'c', 'd', 'e']\r\nletters[1:4] = ['x', 'y']\r\nprint(letters)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='504' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3634' \/><div class='watu-question-choice'><input type='radio' name='answer-504[]' id='answer-id-3634' class='answer answer-19  answerof-504' value='3634' \/>&nbsp;<label for='answer-id-3634' id='answer-label-3634' class=' answer label-19'><span class='answer'>[&#8216;a&#8217;, &#8216;x&#8217;, &#8216;y&#8217;, &#8216;e&#8217;]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3635' \/><div class='watu-question-choice'><input type='radio' name='answer-504[]' id='answer-id-3635' class='answer answer-19  answerof-504' value='3635' \/>&nbsp;<label for='answer-id-3635' id='answer-label-3635' class=' answer label-19'><span class='answer'>[&#8216;a&#8217;, &#8216;x&#8217;, &#8216;y&#8217;, &#8216;d&#8217;, &#8216;e&#8217;]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3636' \/><div class='watu-question-choice'><input type='radio' name='answer-504[]' id='answer-id-3636' class='answer answer-19  answerof-504' value='3636' \/>&nbsp;<label for='answer-id-3636' id='answer-label-3636' class=' answer label-19'><span class='answer'>[&#8216;a&#8217;, &#8216;b&#8217;, &#8216;x&#8217;, &#8216;y&#8217;, &#8216;c&#8217;, &#8216;d&#8217;, &#8216;e&#8217;]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3637' \/><div class='watu-question-choice'><input type='radio' name='answer-504[]' id='answer-id-3637' class='answer answer-19  answerof-504' value='3637' \/>&nbsp;<label for='answer-id-3637' id='answer-label-3637' class=' answer label-19'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType19' value='radio' class=''><\/div><div class='watu-question' id='question-20'><div class='question-content'><p><span class='watu_num'>20. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">my_list = [1, 2, 3]\r\nanother_list = my_list * 2\r\nprint(another_list)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='482' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3546' \/><div class='watu-question-choice'><input type='radio' name='answer-482[]' id='answer-id-3546' class='answer answer-20  answerof-482' value='3546' \/>&nbsp;<label for='answer-id-3546' id='answer-label-3546' class=' answer label-20'><span class='answer'>[1, 2, 3, 1, 2, 3]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3547' \/><div class='watu-question-choice'><input type='radio' name='answer-482[]' id='answer-id-3547' class='answer answer-20  answerof-482' value='3547' \/>&nbsp;<label for='answer-id-3547' id='answer-label-3547' class=' answer label-20'><span class='answer'> [2, 4, 6]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3548' \/><div class='watu-question-choice'><input type='radio' name='answer-482[]' id='answer-id-3548' class='answer answer-20  answerof-482' value='3548' \/>&nbsp;<label for='answer-id-3548' id='answer-label-3548' class=' answer label-20'><span class='answer'>[1, 2, 3]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3549' \/><div class='watu-question-choice'><input type='radio' name='answer-482[]' id='answer-id-3549' class='answer answer-20  answerof-482' value='3549' \/>&nbsp;<label for='answer-id-3549' id='answer-label-3549' class=' answer label-20'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType20' value='radio' class=''><\/div><div class='watu-question' id='question-21'><div class='question-content'><p><span class='watu_num'>21. <\/span><strong>What will be the output of the following code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">aList = [\"PYnative\", [4, 8, 12, 16]]\r\nprint(aList[0][1])    \r\nprint(aList[1][3])<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='70' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3664' \/><div class='watu-question-choice'><input type='radio' name='answer-70[]' id='answer-id-3664' class='answer answer-21  answerof-70' value='3664' \/>&nbsp;<label for='answer-id-3664' id='answer-label-3664' class=' answer label-21'><span class='answer'>P 8<br \/>\nY 16<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3665' \/><div class='watu-question-choice'><input type='radio' name='answer-70[]' id='answer-id-3665' class='answer answer-21  answerof-70' value='3665' \/>&nbsp;<label for='answer-id-3665' id='answer-label-3665' class=' answer label-21'><span class='answer'>P<br \/>\n12<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3666' \/><div class='watu-question-choice'><input type='radio' name='answer-70[]' id='answer-id-3666' class='answer answer-21  answerof-70' value='3666' \/>&nbsp;<label for='answer-id-3666' id='answer-label-3666' class=' answer label-21'><span class='answer'>Y<br \/>\n16<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType21' value='radio' class=''><\/div><div class='watu-question' id='question-22'><div class='question-content'><p><span class='watu_num'>22. <\/span><strong>Given <code>nested_list = [[1, 2], [3, 4], [5, 6]]<\/code>, how would you access the number <code>4<\/code>?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='491' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3582' \/><div class='watu-question-choice'><input type='radio' name='answer-491[]' id='answer-id-3582' class='answer answer-22  answerof-491' value='3582' \/>&nbsp;<label for='answer-id-3582' id='answer-label-3582' class=' answer label-22'><span class='answer'><code>nested_list[1][1]<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3583' \/><div class='watu-question-choice'><input type='radio' name='answer-491[]' id='answer-id-3583' class='answer answer-22  answerof-491' value='3583' \/>&nbsp;<label for='answer-id-3583' id='answer-label-3583' class=' answer label-22'><span class='answer'><code>nested_list[0][3]<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3584' \/><div class='watu-question-choice'><input type='radio' name='answer-491[]' id='answer-id-3584' class='answer answer-22  answerof-491' value='3584' \/>&nbsp;<label for='answer-id-3584' id='answer-label-3584' class=' answer label-22'><span class='answer'><code>nested_list[3]<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3585' \/><div class='watu-question-choice'><input type='radio' name='answer-491[]' id='answer-id-3585' class='answer answer-22  answerof-491' value='3585' \/>&nbsp;<label for='answer-id-3585' id='answer-label-3585' class=' answer label-22'><span class='answer'><code>nested_list[1, 1]<\/code><\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType22' value='radio' class=''><\/div><div class='watu-question' id='question-23'><div class='question-content'><p><span class='watu_num'>23. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">a = [1, 2]\r\nb = [3, 4]\r\nc = a + b\r\nprint(c)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='498' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3610' \/><div class='watu-question-choice'><input type='radio' name='answer-498[]' id='answer-id-3610' class='answer answer-23  answerof-498' value='3610' \/>&nbsp;<label for='answer-id-3610' id='answer-label-3610' class=' answer label-23'><span class='answer'>[1, 2, 3, 4]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3611' \/><div class='watu-question-choice'><input type='radio' name='answer-498[]' id='answer-id-3611' class='answer answer-23  answerof-498' value='3611' \/>&nbsp;<label for='answer-id-3611' id='answer-label-3611' class=' answer label-23'><span class='answer'>[1, 2, [3, 4]]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3612' \/><div class='watu-question-choice'><input type='radio' name='answer-498[]' id='answer-id-3612' class='answer answer-23  answerof-498' value='3612' \/>&nbsp;<label for='answer-id-3612' id='answer-label-3612' class=' answer label-23'><span class='answer'>[4, 6]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3613' \/><div class='watu-question-choice'><input type='radio' name='answer-498[]' id='answer-id-3613' class='answer answer-23  answerof-498' value='3613' \/>&nbsp;<label for='answer-id-3613' id='answer-label-3613' class=' answer label-23'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType23' value='radio' class=''><\/div><div class='watu-question' id='question-24'><div class='question-content'><p><span class='watu_num'>24. <\/span><strong>Given <code>data = [10, 20, 30, 40, 50]<\/code>, what does <code>data[1:4]<\/code> return?<\/strong><\/p>\n<\/div><input type='hidden' name='question_id[]' value='481' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3542' \/><div class='watu-question-choice'><input type='radio' name='answer-481[]' id='answer-id-3542' class='answer answer-24  answerof-481' value='3542' \/>&nbsp;<label for='answer-id-3542' id='answer-label-3542' class=' answer label-24'><span class='answer'>[10, 20, 30]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3543' \/><div class='watu-question-choice'><input type='radio' name='answer-481[]' id='answer-id-3543' class='answer answer-24  answerof-481' value='3543' \/>&nbsp;<label for='answer-id-3543' id='answer-label-3543' class=' answer label-24'><span class='answer'>[20, 30, 40]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3544' \/><div class='watu-question-choice'><input type='radio' name='answer-481[]' id='answer-id-3544' class='answer answer-24  answerof-481' value='3544' \/>&nbsp;<label for='answer-id-3544' id='answer-label-3544' class=' answer label-24'><span class='answer'>[20, 30, 40, 50]<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3545' \/><div class='watu-question-choice'><input type='radio' name='answer-481[]' id='answer-id-3545' class='answer answer-24  answerof-481' value='3545' \/>&nbsp;<label for='answer-id-3545' id='answer-label-3545' class=' answer label-24'><span class='answer'>[10, 20, 30, 40]<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType24' value='radio' class=''><\/div><div class='watu-question' id='question-25'><div class='question-content'><p><span class='watu_num'>25. <\/span><strong>What will be the output of the following Python code?<\/strong><\/p>\n<pre id=\"syntax\"><code class=\"language-python\">my_list = ['c', 'a', 'b']\r\nmy_list.sort()\r\nprint(my_list)<\/code><\/pre>\n<\/div><input type='hidden' name='question_id[]' value='488' \/><div class='watu-questions-wrap '><input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3570' \/><div class='watu-question-choice'><input type='radio' name='answer-488[]' id='answer-id-3570' class='answer answer-25  answerof-488' value='3570' \/>&nbsp;<label for='answer-id-3570' id='answer-label-3570' class=' answer label-25'><span class='answer'><code>['a', 'b', 'c']<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3571' \/><div class='watu-question-choice'><input type='radio' name='answer-488[]' id='answer-id-3571' class='answer answer-25  answerof-488' value='3571' \/>&nbsp;<label for='answer-id-3571' id='answer-label-3571' class=' answer label-25'><span class='answer'><code>['c', 'b', 'a']<\/code><\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3572' \/><div class='watu-question-choice'><input type='radio' name='answer-488[]' id='answer-id-3572' class='answer answer-25  answerof-488' value='3572' \/>&nbsp;<label for='answer-id-3572' id='answer-label-3572' class=' answer label-25'><span class='answer'>None<\/span><\/label><\/div>\n<input type='hidden' name='answer_ids[]' class='watu-answer-ids' value='3573' \/><div class='watu-question-choice'><input type='radio' name='answer-488[]' id='answer-id-3573' class='answer answer-25  answerof-488' value='3573' \/>&nbsp;<label for='answer-id-3573' id='answer-label-3573' class=' answer label-25'><span class='answer'>Error<\/span><\/label><\/div>\n<\/div><input type='hidden' id='questionType25' value='radio' class=''><\/div><div style='display:none' id='question-26'><br \/><div class='question-content'><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pynative.com\/wp-content\/plugins\/watu\/loading.gif\" width=\"16\" height=\"16\" alt=\"Loading ...\" title=\"Loading ...\" \/>&nbsp;Loading &#8230;<\/div><\/div><br \/>\n<input type=\"button\" name=\"action\" onclick=\"Watu.submitResult()\" id=\"action-button\" value=\"Submit\"  class=\"watu-submit-button\" \/>\n<input type=\"hidden\" name=\"no_ajax\" value=\"0\"><input type=\"hidden\" name=\"quiz_id\" value=\"7\" \/>\n<input type=\"hidden\" id=\"watuStartTime\" name=\"start_time\" value=\"2026-04-23 21:49:53\" \/>\n<\/form>\n<\/div>\n<div id=\"watu-loading-result\" style=\"display:none;\">\n\t<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pynative.com\/wp-content\/plugins\/watu\/loading.gif\" width=\"16\" height=\"16\" alt=\"Loading\" title=\"Loading\" \/><\/p>\n<\/div>\t\n<script type=\"text\/javascript\">\nvar exam_id=0;\nvar question_ids='';\nvar watuURL='';\njQuery(function($){\nquestion_ids = \"75,487,502,484,76,494,478,477,69,500,497,64,496,72,480,495,479,489,504,482,70,491,498,481,488\";\nexam_id = 7;\nWatu.exam_id = exam_id;\nWatu.qArr = question_ids.split(',');\nWatu.post_id = 5955;\nWatu.singlePage = '1';\nWatu.hAppID = \"0.08201800 1776961193\";\nwatuURL = \"https:\/\/pynative.com\/wp-admin\/admin-ajax.php\";\nWatu.noAlertUnanswered = 0;\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>This Python list quiz provides Multiple Choice Questions(MCQs) to test your understanding of Python lists, from basic creation and access to more advanced manipulation techniques. Each Multiple Choice Question (MCQ) comes with a clear explanation for its answer, helping you to understand why it&#8217;s correct. The quiz covers questions on the below topics. Whether you&#8217;re [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[22,1,16],"tags":[28],"class_list":{"0":"post-5955","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-python","7":"category-basics","8":"category-quizzes","9":"tag-python-quizzes","10":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python List Quiz [15 List Quiz Questions]<\/title>\n<meta name=\"description\" content=\"This Python List quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulations. This list quiz contains 15 MCQs\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pynative.com\/python-list-quiz\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python List Quiz\" \/>\n<meta property=\"og:description\" content=\"This Python List quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulations. This list quiz contains 15 MCQs\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pynative.com\/python-list-quiz\/\" \/>\n<meta property=\"og:site_name\" content=\"PYnative\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-23T11:13:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-26T06:38:26+00:00\" \/>\n<meta name=\"author\" content=\"Vishal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PyNative\" \/>\n<meta name=\"twitter:site\" content=\"@PyNative\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/\"},\"author\":{\"name\":\"Vishal\",\"@id\":\"https:\\\/\\\/pynative.com\\\/#\\\/schema\\\/person\\\/64b55d5bde2265918c5a9931de4de71f\"},\"headline\":\"Python List Quiz\",\"datePublished\":\"2020-02-23T11:13:02+00:00\",\"dateModified\":\"2025-08-26T06:38:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/\"},\"wordCount\":191,\"commentCount\":36,\"publisher\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/#\\\/schema\\\/person\\\/64b55d5bde2265918c5a9931de4de71f\"},\"keywords\":[\"Python Quizzes\"],\"articleSection\":[\"Python\",\"Python Basics\",\"Python Quizzes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/\",\"url\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/\",\"name\":\"Python List Quiz [15 List Quiz Questions]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/#website\"},\"datePublished\":\"2020-02-23T11:13:02+00:00\",\"dateModified\":\"2025-08-26T06:38:26+00:00\",\"description\":\"This Python List quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulations. This list quiz contains 15 MCQs\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pynative.com\\\/python-list-quiz\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pynative.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\\\/\\\/pynative.com\\\/python\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Quizzes\",\"item\":\"https:\\\/\\\/pynative.com\\\/python\\\/quizzes\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Python List Quiz\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pynative.com\\\/#website\",\"url\":\"https:\\\/\\\/pynative.com\\\/\",\"name\":\"PYnative\",\"description\":\"Python Programming\",\"publisher\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/#\\\/schema\\\/person\\\/64b55d5bde2265918c5a9931de4de71f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pynative.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/pynative.com\\\/#\\\/schema\\\/person\\\/64b55d5bde2265918c5a9931de4de71f\",\"name\":\"Vishal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pynative.com\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/vishalHule.jpg\",\"url\":\"https:\\\/\\\/pynative.com\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/vishalHule.jpg\",\"contentUrl\":\"https:\\\/\\\/pynative.com\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/vishalHule.jpg\",\"width\":968,\"height\":1065,\"caption\":\"Vishal\"},\"logo\":{\"@id\":\"https:\\\/\\\/pynative.com\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/vishalHule.jpg\"},\"description\":\"Founder of PYnative.com. I am a Python developer and I love to write articles to help developers. | All the best for your future Python endeavors!\",\"sameAs\":[\"https:\\\/\\\/pynative.com\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python List Quiz [15 List Quiz Questions]","description":"This Python List quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulations. This list quiz contains 15 MCQs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pynative.com\/python-list-quiz\/","og_locale":"en_US","og_type":"article","og_title":"Python List Quiz","og_description":"This Python List quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulations. This list quiz contains 15 MCQs","og_url":"https:\/\/pynative.com\/python-list-quiz\/","og_site_name":"PYnative","article_published_time":"2020-02-23T11:13:02+00:00","article_modified_time":"2025-08-26T06:38:26+00:00","author":"Vishal","twitter_card":"summary_large_image","twitter_creator":"@PyNative","twitter_site":"@PyNative","twitter_misc":{"Written by":"Vishal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pynative.com\/python-list-quiz\/#article","isPartOf":{"@id":"https:\/\/pynative.com\/python-list-quiz\/"},"author":{"name":"Vishal","@id":"https:\/\/pynative.com\/#\/schema\/person\/64b55d5bde2265918c5a9931de4de71f"},"headline":"Python List Quiz","datePublished":"2020-02-23T11:13:02+00:00","dateModified":"2025-08-26T06:38:26+00:00","mainEntityOfPage":{"@id":"https:\/\/pynative.com\/python-list-quiz\/"},"wordCount":191,"commentCount":36,"publisher":{"@id":"https:\/\/pynative.com\/#\/schema\/person\/64b55d5bde2265918c5a9931de4de71f"},"keywords":["Python Quizzes"],"articleSection":["Python","Python Basics","Python Quizzes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pynative.com\/python-list-quiz\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pynative.com\/python-list-quiz\/","url":"https:\/\/pynative.com\/python-list-quiz\/","name":"Python List Quiz [15 List Quiz Questions]","isPartOf":{"@id":"https:\/\/pynative.com\/#website"},"datePublished":"2020-02-23T11:13:02+00:00","dateModified":"2025-08-26T06:38:26+00:00","description":"This Python List quiz provides Multiple Choice Questions(MCQ) to get familiar with Python list manipulations. This list quiz contains 15 MCQs","breadcrumb":{"@id":"https:\/\/pynative.com\/python-list-quiz\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pynative.com\/python-list-quiz\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pynative.com\/python-list-quiz\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pynative.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/pynative.com\/python\/"},{"@type":"ListItem","position":3,"name":"Quizzes","item":"https:\/\/pynative.com\/python\/quizzes\/"},{"@type":"ListItem","position":4,"name":"Python List Quiz"}]},{"@type":"WebSite","@id":"https:\/\/pynative.com\/#website","url":"https:\/\/pynative.com\/","name":"PYnative","description":"Python Programming","publisher":{"@id":"https:\/\/pynative.com\/#\/schema\/person\/64b55d5bde2265918c5a9931de4de71f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pynative.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/pynative.com\/#\/schema\/person\/64b55d5bde2265918c5a9931de4de71f","name":"Vishal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pynative.com\/wp-content\/uploads\/2019\/01\/vishalHule.jpg","url":"https:\/\/pynative.com\/wp-content\/uploads\/2019\/01\/vishalHule.jpg","contentUrl":"https:\/\/pynative.com\/wp-content\/uploads\/2019\/01\/vishalHule.jpg","width":968,"height":1065,"caption":"Vishal"},"logo":{"@id":"https:\/\/pynative.com\/wp-content\/uploads\/2019\/01\/vishalHule.jpg"},"description":"Founder of PYnative.com. I am a Python developer and I love to write articles to help developers. | All the best for your future Python endeavors!","sameAs":["https:\/\/pynative.com"]}]}},"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Vishal","author_link":"https:\/\/pynative.com\/author\/vishal\/"},"_links":{"self":[{"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/posts\/5955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/comments?post=5955"}],"version-history":[{"count":1,"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/posts\/5955\/revisions"}],"predecessor-version":[{"id":12172,"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/posts\/5955\/revisions\/12172"}],"wp:attachment":[{"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/media?parent=5955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/categories?post=5955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pynative.com\/wp-json\/wp\/v2\/tags?post=5955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}