{"id":17774,"date":"2023-08-30T11:14:45","date_gmt":"2023-08-30T11:14:45","guid":{"rendered":"https:\/\/www.prepbytes.com\/blog\/?p=17774"},"modified":"2023-08-30T11:14:45","modified_gmt":"2023-08-30T11:14:45","slug":"namespaces-and-scope-in-python","status":"publish","type":"post","link":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/","title":{"rendered":"Namespaces and Scope in Python"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg\" alt=\"\" \/><\/p>\n<p>Python, as a versatile and dynamic programming language, employs the concepts of namespaces and scope in Python to manage the visibility and accessibility of variables, functions, and objects. These concepts play a pivotal role in structuring code, preventing naming conflicts, and enhancing code organization. In this article, we will delve into the realm of namespaces and scope, exploring their significance and providing illustrative Python code snippets to demonstrate their behavior.<\/p>\n<h2>What is Namespaces in Python?<\/h2>\n<p>The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects. It acts as a boundary, ensuring that names are unique and avoiding naming conflicts. Python provides multiple types of namespaces:<\/p>\n<p>1.<strong> Local Namespace:<\/strong> refers to the names defined within a function.<\/p>\n<ol start=\"2\">\n<li><strong>Enclosing Namespace:<\/strong> Corresponds to the namespaces of enclosing functions (for nested functions).<\/li>\n<li><strong>Global Namespace:<\/strong> Encompasses the names defined at the top level of a module or script.<\/li>\n<li><strong>Built-in Namespace:<\/strong> Contains the names of built-in Python functions and objects.<\/li>\n<\/ol>\n<h2>Different types of namespaces in Python<\/h2>\n<p>Let&#8217;s delve deeper into each type of namespace in Python and explore their characteristics in more detail.<\/p>\n<p><strong>1. Local Namespace:<\/strong><br \/>\nThe local namespace is created whenever a function is called and is destroyed when the function exits. It contains the names of variables and parameters that are defined within the function. These variables are only accessible within the function&#8217;s body. When the function is called again, a new local namespace is created.<\/p>\n<pre><code>def my_function():\n    local_var = \"I'm local to my_function\"\n    print(local_var)\n\nmy_function()\n\n# Trying to access local_var outside the function\n# This will raise a NameError\n# print(local_var)<\/code><\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nIn this example, local_var is defined within the my_function() scope. It cannot be accessed outside the function&#8217;s body. This isolation prevents conflicts with variables in other parts of the code.<\/p>\n<p><strong>2. Enclosing Namespace:<\/strong><br \/>\nEnclosing namespaces come into play when you have nested functions, where one function is defined inside another. The inner function can access variables from the outer function&#8217;s namespace.<\/p>\n<pre><code>def outer_function():\n    outer_var = \"I'm in the outer function\"\n\n    def inner_function():\n        print(outer_var)  # Accessing variable from the enclosing namespace\n\n    inner_function()\n\nouter_function()\n\n# Trying to access outer_var outside the function\n# This will raise a NameError\n# print(outer_var)<\/code><\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nIn this example, inner_function() can access the outer_var from the outer function&#8217;s scope. This mechanism allows for sharing data between nested functions while maintaining encapsulation.<\/p>\n<p><strong>3. Global Namespace:<\/strong><br \/>\nThe global namespace covers the entire module or script. Variables defined at the top level of the module belong to the global namespace and are accessible from anywhere within the module.<\/p>\n<pre><code>global_var = \"I'm in the global namespace\"\n\ndef my_function():\n    print(global_var)  # Accessing variable from the global namespace\n\nmy_function()\nprint(global_var)<\/code><\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nHere, global_var is defined outside of any function, making it a part of the global namespace. It can be accessed both within my_function() and outside of it.<\/p>\n<p><strong>1. Built-in Namespace:<\/strong><\/p>\n<p>The built-in namespace contains Python&#8217;s built-in functions and objects. These names are always available without the need for importing or defining them. Examples include functions like print() and objects like int and lists.<\/p>\n<pre><code># Using a built-in function and object\nprint(len([1, 2, 3]))\n\n# Trying to redefine a built-in function\n# This will raise a SyntaxError\n# def len(x):\n#  return 42<\/code><\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nIn the example, len() is a built-in function, and int and list are built-in object types. These names are part of the built-in namespace and are automatically available without any imports.<\/p>\n<h2>What is Scope in Python?<\/h2>\n<p>Scope defines the region in a program where a namespace is accessible. It determines which names can be referenced from a given location in code. Python employs the LEGB (Local, Enclosing, Global, Built-in) rule to resolve names in different namespaces. This rule signifies that if a name is not found in the local namespace, the interpreter will search for it in the enclosing, global, and built-in namespaces in that order.<\/p>\n<h2>Code Implementation of namespaces and scope in Python<\/h2>\n<p>Let&#8217;s explore these concepts through illustrative Python code snippets:<\/p>\n<pre><code># Global namespace\nglobal_variable = \"I'm in the global namespace\"\n\ndef outer_function():\n    # Enclosing namespace\n    enclosing_variable = \"I'm in the enclosing namespace\"\n\n    def inner_function():\n        # Local namespace\n        local_variable = \"I'm in the local namespace\"\n        print(local_variable, enclosing_variable, global_variable)\n\n    inner_function()\n\nouter_function()\nprint(global_variable)\n\n# Trying to access a non-existent variable\n# This will raise a NameError\n# print(non_existent_variable)<\/code><\/pre>\n<p><strong>Output:<\/strong><\/p>\n<pre><code>I'm in the local namespace I'm in the enclosing namespace I'm in the global namespace\nI'm in the global namespace<\/code><\/pre>\n<p><strong>Explanation:<\/strong><br \/>\nIn this example, we define variables in different namespaces: local_variable in the local namespace of inner_function, enclosing_variable in the enclosing namespace of outer_function, and global_variable in the global namespace. The LEGB rule ensures that variables are accessed in the appropriate scope.<\/p>\n<p>Attempting to access non_existent_variable results in a name error, emphasizing the importance of correctly defined variables and namespaces.<\/p>\n<p><strong>Conclusion<\/strong><br \/>\nNamespaces and scope are fundamental concepts in Python, contributing to the language&#8217;s flexibility and organization. By understanding how namespaces encapsulate identifiers and how scope defines the accessibility of these namespaces, developers can write clean, efficient, and conflict-free code. The LEGB rule guides the interpreter&#8217;s name resolution process, ensuring that variables are accessed from the correct namespace based on the context. As you continue your journey in Python programming, mastering these concepts will undoubtedly enhance your ability to write robust and maintainable code.<\/p>\n<h2>Frequently Asked Questions (FAQs)<\/h2>\n<p>Here are some of the frequently asked questions on namespaces and scope in Python.<\/p>\n<p><strong>Q1. What is a namespace in Python?<\/strong><br \/>\nA namespace in Python is a container that holds names (identifiers) and maps them to their corresponding objects. It serves as a boundary that prevents naming conflicts and helps organize variables, functions, classes, and other entities within a program.<\/p>\n<p><strong>Q2. How many types of namespaces are there in Python?<\/strong><br \/>\nPython has four main types of namespaces:<br \/>\n<strong>Local Namespace:<\/strong> Associated with a function&#8217;s scope.<br \/>\n<strong>Enclosing Namespace<\/strong>: Relevant for Nested Functions<br \/>\n<strong>Global Namespace:<\/strong> Encompasses the entire module or script.<br \/>\n<strong>Built-in Namespace:<\/strong> Contains Python&#8217;s built-in functions and objects.<\/p>\n<p><strong>Q3. What is the LEGB rule in Python&#8217;s namespace resolution?<\/strong><br \/>\nThe LEGB rule stands for Local, Enclosing, Global, and Built-in. It defines the order in which Python looks for names in different namespaces when resolving them. If a name is not found in the local namespace, the interpreter searches in the enclosing, global, and built-in namespaces in that order.<\/p>\n<p><strong>Q4. How to access a local variable outside of its function?<\/strong><br \/>\nNo, a local variable is only accessible within the function where it is defined. Attempting to access it outside the function&#8217;s scope will result in a NameError.<\/p>\n<p><strong>Q5. Why is understanding namespaces important in Python?<\/strong><br \/>\nUnderstanding namespaces is crucial for writing well-organized and conflict-free code. It allows you to manage variable visibility, prevent naming clashes, and create modular programs. Proper utilization of namespaces enhances code readability and makes it easier to collaborate on projects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python, as a versatile and dynamic programming language, employs the concepts of namespaces and scope in Python to manage the visibility and accessibility of variables, functions, and objects. These concepts play a pivotal role in structuring code, preventing naming conflicts, and enhancing code organization. In this article, we will delve into the realm of namespaces [&hellip;]<\/p>\n","protected":false},"author":52,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[154],"tags":[],"class_list":["post-17774","post","type-post","status-publish","format-standard","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Namespaces and Scope in Python<\/title>\n<meta name=\"description\" content=\"The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Namespaces and Scope in Python\" \/>\n<meta property=\"og:description\" content=\"The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"PrepBytes Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prepbytes0211\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-30T11:14:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg\" \/>\n<meta name=\"author\" content=\"Prepbytes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prepbytes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\"},\"author\":{\"name\":\"Prepbytes\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e\"},\"headline\":\"Namespaces and Scope in Python\",\"datePublished\":\"2023-08-30T11:14:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\"},\"wordCount\":979,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/43.205.93.38\/#organization\"},\"image\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\",\"url\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\",\"name\":\"Namespaces and Scope in Python\",\"isPartOf\":{\"@id\":\"http:\/\/43.205.93.38\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg\",\"datePublished\":\"2023-08-30T11:14:45+00:00\",\"description\":\"The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects.\",\"breadcrumb\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage\",\"url\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg\",\"contentUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/43.205.93.38\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/prepbytes.com\/blog\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Namespaces and Scope in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/43.205.93.38\/#website\",\"url\":\"http:\/\/43.205.93.38\/\",\"name\":\"PrepBytes Blog\",\"description\":\"ONE-STOP RESOURCE FOR EVERYTHING RELATED TO CODING\",\"publisher\":{\"@id\":\"http:\/\/43.205.93.38\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/43.205.93.38\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/43.205.93.38\/#organization\",\"name\":\"Prepbytes\",\"url\":\"http:\/\/43.205.93.38\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp\",\"contentUrl\":\"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp\",\"width\":160,\"height\":160,\"caption\":\"Prepbytes\"},\"image\":{\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/prepbytes0211\/\",\"https:\/\/www.instagram.com\/prepbytes\/\",\"https:\/\/www.linkedin.com\/company\/prepbytes\/\",\"https:\/\/www.youtube.com\/channel\/UC0xGnHDrjUM1pDEK2Ka5imA\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e\",\"name\":\"Prepbytes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g\",\"caption\":\"Prepbytes\"},\"url\":\"https:\/\/prepbytes.com\/blog\/author\/gourav-jaincollegedekho-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Namespaces and Scope in Python","description":"The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects.","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:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/","og_locale":"en_US","og_type":"article","og_title":"Namespaces and Scope in Python","og_description":"The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects.","og_url":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/","og_site_name":"PrepBytes Blog","article_publisher":"https:\/\/www.facebook.com\/prepbytes0211\/","article_published_time":"2023-08-30T11:14:45+00:00","og_image":[{"url":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg","type":"","width":"","height":""}],"author":"Prepbytes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Prepbytes","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#article","isPartOf":{"@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/"},"author":{"name":"Prepbytes","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e"},"headline":"Namespaces and Scope in Python","datePublished":"2023-08-30T11:14:45+00:00","mainEntityOfPage":{"@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/"},"wordCount":979,"commentCount":0,"publisher":{"@id":"http:\/\/43.205.93.38\/#organization"},"image":{"@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/","url":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/","name":"Namespaces and Scope in Python","isPartOf":{"@id":"http:\/\/43.205.93.38\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage"},"image":{"@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg","datePublished":"2023-08-30T11:14:45+00:00","description":"The namespaces in Python is a container that holds identifiers (names of variables, functions, classes, etc.) and maps them to their corresponding objects.","breadcrumb":{"@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#primaryimage","url":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg","contentUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1693394061544-Topic%20%283%29.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/prepbytes.com\/blog\/namespaces-and-scope-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/43.205.93.38\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/prepbytes.com\/blog\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Namespaces and Scope in Python"}]},{"@type":"WebSite","@id":"http:\/\/43.205.93.38\/#website","url":"http:\/\/43.205.93.38\/","name":"PrepBytes Blog","description":"ONE-STOP RESOURCE FOR EVERYTHING RELATED TO CODING","publisher":{"@id":"http:\/\/43.205.93.38\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/43.205.93.38\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/43.205.93.38\/#organization","name":"Prepbytes","url":"http:\/\/43.205.93.38\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/","url":"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp","contentUrl":"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp","width":160,"height":160,"caption":"Prepbytes"},"image":{"@id":"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/prepbytes0211\/","https:\/\/www.instagram.com\/prepbytes\/","https:\/\/www.linkedin.com\/company\/prepbytes\/","https:\/\/www.youtube.com\/channel\/UC0xGnHDrjUM1pDEK2Ka5imA"]},{"@type":"Person","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e","name":"Prepbytes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g","caption":"Prepbytes"},"url":"https:\/\/prepbytes.com\/blog\/author\/gourav-jaincollegedekho-com\/"}]}},"_links":{"self":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/17774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/comments?post=17774"}],"version-history":[{"count":2,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/17774\/revisions"}],"predecessor-version":[{"id":17785,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/17774\/revisions\/17785"}],"wp:attachment":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/media?parent=17774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/categories?post=17774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/tags?post=17774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}