[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685775-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-685775-en":130,"doc-similar-685775":158},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","lists-dictionaries-and-tuples-topic-1","Lists, Dictionaries and Tuples - Topic - 1","","Study questions and model answers on Python sequence data, focusing on list operations and related built-in sequence behaviors. Covers identification of built-in sequence types, indexing and slicing outputs, deleting single elements, comparing lists with cmp, and measuring list length. Explains list methods including max, min, append, count, extend, reverse, sort, and remove, along with converting tuples to lists. Includes examples using Python code snippets and expected outputs for short- and short-answer formats.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/lists-dictionaries-and-tuples-topic-1/685775/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/lists-dictionaries-and-tuples-topic-1/685775.png","ImageObject",300,407,{"name":42,"@type":43},"WPS_1786070896","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-12","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"How many built-in sequence types are there in Python?","Question",{"text":63,"@type":64},"Python has six built-in types of sequences.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How do you remove an element from a list in Python?",{"text":68,"@type":64},"Use the del statement when you know the index to delete, or use list.remove(obj) when you know the element value.",{"name":70,"@type":61,"acceptedAnswer":71},"What does list.append(obj) do?",{"text":72,"@type":64},"It appends object obj to the end of the list.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},685775,1794018224,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,105,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":30,"preview_urls":145},549768072016,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","Lists, Dictionaries and Tuples  \nTopic – 1  \nLists  \nVery Short Answer Type Questions (1 marks each)  \nQuestion 1:  \nHow many types of built-in types of sequences in Python.  \nAnswer:  \nPython has six built-in types of sequences.  \nQuestion 2:  \nWrite the output of the given Python code.  \n\\# !/user/bin/python  \nlist1 = [‘physics’, ‘chemistry’, 1997, 2000];  \nlist2 = [1,2,3,4,5,6, 7]; print “list1[0]”, list1[0]  \nAnswer:  \nlist1[0]: physics  \nQuestion 3:  \nWrite the output of the given Python code.  \n\\# !/user/bin/python  \nlistl = [‘physics’, ‘chemistry’, 1997,2000];  \nlist2 = [1,2, 3,4,5, 6, 7]; print “list2[l:5[ :”, list2[l:5]  \nAnswer:  \nlist2[1:5[: [2,3,4,5]  \nQuestion 4:  \nHow can we remove list element ?  \nAnswer:  \nTo remove a list element, you can use either the del statement or the remove]) method  \nQuestion 5:  \nWhy we use cmp(listl, list2) in Python?  \nAnswer:  \nIt compares elements of both lists.  \nQuestion 6:  \nWhat is the use of len(list)) in Python?  \nAnswer:  \nIt gives the total length of the list.  \nQuestion 7:  \nDescribe max(list) method.  \nAnswer:  \nIt returns item from the list with max value.  \nQuestion 8:  \nDescribe min(list) method.  \nAnswer:  \nIt returns item from the list with min value.  \nQuestion 9:  \nWhat is the use of list(seq) in Python ?  \nAnswer:  \nIt converts a tuple into list.  \nQuestion 10:  \nWhat do you mean by list.append(obj)  \nAnswer:  \nAppends object obj to list  \nQuestion 11:  \nWhat do you mean by list.count(obj)  \nAnswer:  \nReturns count how many times obj occurs in list  \nQuestion 12:  \nExplain list.extend(seq)  \nAnswer:  \nAppends the contents of seq to list.  \nQuestion 13:  \nIs list. reverse() method return a value?  \nAnswer:  \nThis method does not return any value but reverse the given object from the list  \nQuestion 14:  \nWhich method is used to sort objects of list.  \nAnswer:  \nsort ()  \nQuestion 15:  \nWhich function is used to reverse objects of list in place.  \nAnswer:  \nlist.reverse ()  \nQuestion 16:  \nWhich function is use for removing object obj from list.  \nAnswer:  \nlist.remove(obj)  \nQuestion 17:  \nWhich function is use for returning the lowest index in list that obj appears.  \nAnswer:  \nList index (obj) .  \nShort Answer Type Questions (2 marks each)  \nQuestion 1:  \nDefine list in Python.  \nAnswer:  \nThe list is a most versatile datatype available in Python which can be written as a list of commaseparated values (items) between square brackets. Good thing about a list is that items in a list need not all have the same type. Creating a list is as simple as putting different commaseparated values between square brackets.  \nFor example :  \nlist1 = [‘physics’, ‘chemistry’, 1997,2000];  \nlist2 = [1,2, 3,4, 5];  \nlist3 = ’[‘a”,“b”,“c”,“d”];  \nQuestion 2:  \nGive an example to access values in lists.  \nAnswer:  \nTo access value in lists, use the square brackets for slicking along with the index or indices to obtain value available at that index. Following is a simple example :  \n\\# !/user/bin/python  \nlist1 = [‘physics’, ‘chemistry’, 1997, 2000];  \nlist2 = [1, 2, 3, 4, 5, 6, 7]; print “list1 [0]:”,  \nlist1 [0] print “list2[1 :5]:”, list2[1:5]  \nWhen the above code is executed, it produces the following result:  \nlist1 [0]: physics list2[1:5] : [2, 3, 4, 5]  \nQuestion 3:  \nGive an example to update single or multiple elements of lists  \nAnswer:  \nYou can update single or multiple elements of lists by giving the slice on the left-hand side of the assignment operator, and you can add elements in a list with the append( ) method. Following is a simple example:  \n\\# !/user/bin/python  \nlistl = [‘physics’, ‘chemistry’, 1997, 2000];  \nprint “Value available at index 2 :”  \nprint list[2];  \nlist[2] = 2001;  \nprint “New value available at index 2 :”  \nprint list [2];  \nNote: append)) method is discussed in subsequent section.  \nWhen the above code is executed, it produces the following result:  \nValue available at index 2 : 1997  \nNew value available at index 2 : 2001  \nQuestion 4:  \nGive ","cbCaicb20mxwGpWn","https://ap.wps.com/l/cbCaicb20mxwGpWn","pdf",640712,29,"English","# Very Short Answer Type Questions (1 marks each)\n## Short Answer Type Questions (2 marks each)\n## List operations and methods","[{\"question\":\"How many built-in sequence types are there in Python?\",\"answer\":\"Python has six built-in types of sequences.\"},{\"question\":\"How do you remove an element from a list in Python?\",\"answer\":\"Use the del statement when you know the index to delete, or use list.remove(obj) when you know the element value.\"},{\"question\":\"What does list.append(obj) do?\",\"answer\":\"It appends object obj to the end of the list.\"}]","Lists, Dictionaries and Tuples - Topic - 1 | PDF",73,[146,150,154],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/45afd87b8d4c11f9a5d7c511cdfb3994.webp",983,1272,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/b9bc716a8deb732fcaf1e30ced60a488.webp",982,1270,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d7889e23cc297ac51e153f2733d82038.webp",981,1269,{"list":159,"token":11},[160,166,172,179,186,192,199,205,211,217],{"doc_id":161,"doc_title":162,"file_type":137,"home_preview_img_url":163,"slug":164,"view_count":110,"category_name":29,"create_tm":165},685774,"UNIT 2 - Lists, Dictionaries And Sets","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203839/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=3%2FE9mz0ZLPAwEm3%2B1%2F4xlkIX9TM%3D","unit-2-lists-dictionaries-and-sets",1794018222,{"doc_id":167,"doc_title":168,"file_type":137,"home_preview_img_url":169,"slug":170,"view_count":55,"category_name":29,"create_tm":171},685628,"Unit 2 - Chapter 6 - List Creation - List in Python","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000169819/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=y0NlJN2kB%2FMYIgsXWX5FxryRcXw%3D","unit-2-chapter-6-list-creation-list-in-python",1794016091,{"doc_id":173,"doc_title":174,"file_type":137,"home_preview_img_url":175,"slug":176,"view_count":177,"category_name":29,"create_tm":178},391904,"Deloitte Python Interview Questions - Basic Python Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917409659/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=ujSS1WE3WKK9klI%2FRaC14nsBm0s%3D","deloitte-python-interview-questions-basic-python-questions",14,1790359985,{"doc_id":180,"doc_title":181,"file_type":137,"home_preview_img_url":182,"slug":183,"view_count":184,"category_name":29,"create_tm":185},461668,"Quiz 02-Practice - COMP 110 Practice Quiz - Spring 2024","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926083182/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=26yD%2BSr4iD%2Bg%2Fl2VWXO8I6Z6wwE%3D","quiz-02-practice-comp-110-practice-quiz-spring-2024",12,1790762100,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":33,"category_name":29,"create_tm":191},718150,"MULTIPLE CHOICE QUESTIONS - B.Sc.Mathematics - Sixth Semester - MTS6 B14(E04): MATHEMATICAL PROGRAMMING WITH PYTHON AND LATEX","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230018609149/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=CnPRrgSaElPujBthWuQauYDjPmE%3D","multiple-choice-questions-bscmathematics-sixth-semester-mts6-b14e04-mathematical-programming-with-python-and-latex",1794854118,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":197,"category_name":29,"create_tm":198},391172,"Infosys-Python-Interview-Questions - Interview Questions - Python","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917366635/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=6bkdre90ZIYAhzdJIFSuHlCK%2Bqk%3D","infosys-python-interview-questions-interview-questions-python",17,1790349846,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":26,"category_name":29,"create_tm":204},728611,"W4 Exam - JamCoders Week 4 Exam July 30, 2026","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230030203011/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=TWM8rhKFnZeyR8TPxidF%2BiKR8p8%3D","w4-exam-jamcoders-week-4-exam-july-30-2026",1795292664,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":96,"category_name":29,"create_tm":210},697981,"ICDL Computing Lesson 8 - Aggregate Data Types","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146836/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=I2t2NguIwubTtPfP5fGFsFsiyoU%3D","icdl-computing-lesson-8-aggregate-data-types",1794446564,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":55,"category_name":29,"create_tm":216},685781,"STUDENTS’ NOTE - ADVANCED PROGRAMMING I - FUNCTIONS AND ARRAYS/LISTS - Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000208883/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=fU0B%2FNm9u%2FwsfgK9prUY%2FMaqcNI%3D","students-note-advanced-programming-i-functions-and-arrayslists-notes",1794018466,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":115,"category_name":29,"create_tm":222},417796,"PFTWeek - Python Basics - Variables, Types, and Operators","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229922495578/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796169239&Signature=mZxvIUdBHLNzU7DGF8MBBOks%2B98%3D","pftweek-python-basics-variables-types-and-operators",1790610654]