[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-391904-105":59,"doc-detail-391904-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","deloitte-python-interview-questions-basic-python-questions","Deloitte Python Interview Questions - Basic Python Questions","","Deloitte Python Interview Questions covers core and intermediate Python concepts through targeted Q&A. The material explains what Python is, highlights its key features, and reviews fundamental data types and literals. It contrasts lists with tuples, compares Python 2 vs Python 3, and describes Python memory management. It further introduces functions, local vs global variables, and escalates to topics like list comprehensions, decorators, shallow vs deep copy, append vs extend, exceptions, lambda functions, and sorting dictionaries.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/deloitte-python-interview-questions-basic-python-questions/391904/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/deloitte-python-interview-questions-basic-python-questions/391904.png","ImageObject",300,407,{"name":92,"@type":93},"Bintang","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-09","2026-09-25",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What are Python’s key features?","Question",{"text":113,"@type":114},"Python is simple and readable, is interpreted line by line, supports dynamic typing, has extensive libraries, and runs across platforms.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How do list and tuple differ in Python?",{"text":118,"@type":114},"Lists are mutable and use square brackets, while tuples are immutable and use parentheses; lists suit dynamic storage and tuples suit fixed storage.",{"name":120,"@type":111,"acceptedAnswer":121},"What is the difference between shallow copy and deep copy?",{"text":122,"@type":114},"Shallow copy creates a new object but copies references to nested objects, so nested changes affect both. Deep copy recursively duplicates nested objects so changes do not affect the original.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},391904,1790892413,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":4},962085564381,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Deloitte Python Interview Questions  \nBasic Python Questions  \n1. What is Python?  \nPython is a high-level, interpreted programming language known for its simplicity. It supports  \nmultiple programming paradigms and is widely used in fields like web development, data  \nscience, artificial intelligence, and more.  \n2. What are the key features of Python?  \n● Simple and Readable: Python’s syntax is easy to learn and use.  \n● Interpreted: Python is executed line by line, making it easy to debug.  \n● Dynamic Typing: No need to declare variable types.  \n● Extensive Libraries: Python has libraries for AI, data science, and more.  \n● Cross-Platform: Python code runs on multiple operating systems.  \n3. What are Python's built-in data types?  \nPython has several built-in data types like integers, floating-point numbers, strings, lists,  \ntuples, dictionaries, and sets. Each of these is designed for different purposes, like storing  \nnumbers, collections of data, or key-value pairs.  \n4. What is the difference between a list and a tuple in Python?  \n● List:  \n○ Mutable (can be modified) .  \n○ Defined using square brackets: [ 1, 2, 3] .  \n○ Suitable for dynamic data storage.  \n● Tuple:  \n○ Immutable (cannot be modified) .  \n○ Defined using parentheses: ( 1, 2, 3) .  \n○ Suitable for fixed data storage.  \n5. What is the difference between Python 2 and Python 3?  \nPython 2 is an older version that is no longer supported, while Python 3 is the modern version. Python 3 introduced many improvements, including better Unicode handling and changes in syntax like the print() function. New projects should always use Python 3.  \n6. How is memory managed in Python?  \n● Private Heap: All Python objects are stored in a private heap.  \n● Reference Counting: Python uses reference counts to track objects.  \n● Garbage Collection: Cyclic garbage collector to clean up unused objects.  \n● Dynamic Memory Allocation: Handled by Python’s memory manager.  \n7. What is PEP 8?  \nPEP 8 is the style guide for writing Python code. It provides guidelines on how to write clean,  \nreadable code, covering naming conventions, indentation, and other coding best practices.  \n8. What are functions in Python?  \n● Definition: A block of reusable code that performs a specific task.  \n● Syntax: Defined using the def keyword.  \n● Arguments: Functions can take input parameters (arguments) .  \n● Return: They may return a value using the return statement.  \nExample: Python code  \ndef add(a, b) :  \nreturn a + b  \n9. What is the difference between local and global variables?  \nLocal variables are declared within a function and can only be accessed inside that function. Global variables are declared outside all functions and can be accessed anywhere in the program. Global variables can be accessed inside functions, but local variables cannot be accessed outside the function they are declared in.  \n10. What are Python literals?  \n● String Literal: 'Hello' or \"World\" .  \n● Numeric Literal: 10, 3.14.  \n● Boolean Literal: True, False.  \n● Special Literal: None, used to represent no value.  \nIntermediate Python Questions  \n11. Explain list comprehensions with an example.  \nList comprehensions provide a concise way to create lists. Instead of using loops, you can  \ngenerate a list in a single line by applying an expression to each item of an existing list.  \nExample:  \nsquares = [x**2 for x in range(5)] \\# Output: [0, 1, 4, 9, 16]  \n12. What are Python decorators?  \n● Definition: A function that modifies another function.  \n● Use Case: Used to add functionality to existing functions.  \n● Syntax: Uses the @decorator_function syntax.  \nExample:  \n@decorator  \ndef my_function():  \npass  \n13. What is the difference between shallow copy and deep copy?  \n● Shallow Copy: Creates a new object but copies references to nested objects. Changes in nested objects will affect both the original and the copy.  \n● Deep Copy: Recursively copies all objects, creating an entirely new object. Changes in nested obj","cbCaibCnd8Nhm057","https://ap.wps.com/l/cbCaibCnd8Nhm057","pdf",338068,14,"English","# Basic Python Questions\n## Intermediate Python Questions","[{\"question\":\"What are Python’s key features?\",\"answer\":\"Python is simple and readable, is interpreted line by line, supports dynamic typing, has extensive libraries, and runs across platforms.\"},{\"question\":\"How do list and tuple differ in Python?\",\"answer\":\"Lists are mutable and use square brackets, while tuples are immutable and use parentheses; lists suit dynamic storage and tuples suit fixed storage.\"},{\"question\":\"What is the difference between shallow copy and deep copy?\",\"answer\":\"Shallow copy creates a new object but copies references to nested objects, so nested changes affect both. Deep copy recursively duplicates nested objects so changes do not affect the original.\"}]","Deloitte Python Interview Questions - Basic Python Questions | PDF",1790359985,35]