{"id":878,"date":"2021-07-18T14:56:56","date_gmt":"2021-07-18T14:56:56","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=878"},"modified":"2021-09-09T10:54:09","modified_gmt":"2021-09-09T10:54:09","slug":"what-is-double-asterisk-in-python","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/","title":{"rendered":"What is Double Asterisk (**) in python ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"in-python\" class=\"color-purple\" style=\"text-align: justify;\">** in python<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>In Python ** is an exponential operator.The double asterisk form of **kwargs is used to pass a keyword, variable-length argument dictionary to a function. Again, the two asterisks (**) are the important element here, as the word kwargs is conventionally used, though not enforced by the language.<\/li>\n<li>Like *args, **kwargs get however several arguments you would like to supply into it. Though **kwargs differs from *args in that you will need to assign keywords.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"text-center row\" style=\"text-align: justify;\"><\/div>\n<p style=\"text-align: justify;\">First, let\u2019s simply print out the **kwargs arguments that we pass to a function. We\u2019ll create a short function to do this:<\/p>\n<p style=\"text-align: justify;\">print_kwargs.py<\/p>\n<div class=\"CodeContent\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<figure class=\"highlight\">\n<pre><code id=\"code2\" class=\"python hljs bash\" data-lang=\"python\"><span class=\"nt\"><strong>def <span class=\"hljs-built_in\">print<\/span>_kwargs(**kwargs):\r\n<span class=\"hljs-built_in\">print<\/span>(kwargs)<\/strong><\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<p style=\"text-align: justify;\">Next, we will call the function with some other keyword arguments passed into the function:<\/p>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"sample-code\">Sample Code:<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-python code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-python code-embed-code\">def print_kwargs(**kwargs):<br\/>        print(kwargs)<br\/>print_kwargs(kwargs_1=&quot;Shark&quot;, kwargs_2=4.5, kwargs_3=True)<\/code><\/pre> <\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"output\">Output :<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-python code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-python code-embed-code\">{&#039;kwargs_3&#039;: True, &#039;kwargs_2&#039;: 4.5, &#039;kwargs_1&#039;: &#039;Shark&#039;}<\/code><\/pre> <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : In Python ** is an exponential operator&#8230;&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5608],"tags":[5849,195,491,360,203,199,214,198,209,205,5846,222,484,196,212,213,286,710,207,366,204,217,282,208,5847,5850,5620,5848,5617,5851,5853,5852,5619,5618,483,206,200,197,280,364,5631],"class_list":["post-878","post","type-post","status-publish","format-standard","hentry","category-python","tag-in-python-arguments","tag-accenture-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-atos-interview-questions-and-answers","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-double-asterisk-in-python","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-infosys-technologies-interview-questions-and-answers","tag-lt-infotech-interview-questions-and-answers","tag-mavenir-interview-questions-and-answers","tag-mphasis-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-peoplestrong-interview-questions-and-answers","tag-persistent-systems-interview-questions-and-answers","tag-prokarma-softech-pvt-ltd-interview-questions-and-answers","tag-python-asterisk-argument","tag-python-asterisk-list","tag-python-data-science-interview-questions","tag-python-double-asterisk-math","tag-python-interview-questions-and-answers-for-testers","tag-python-multiple-arguments-command-line","tag-python-operators","tag-python-pass-args-and-kwargs-to-another-function","tag-python-programming-questions","tag-python-telephonic-interview-questions","tag-reliance-industries-ltd-interview-questions-and-answers","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wells-fargo-interview-questions-and-answers","tag-xoriant-soluti-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is Double Asterisk (**) in python ? - python interview coding question<\/title>\n<meta name=\"description\" content=\"What is Double Asterisk (**) in python ? - python interview coding question ? - In Python ** is an exponential operator. The double asterisk form of **kwargs is used to pass a keyword\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Double Asterisk (**) in python ? - python interview coding question\" \/>\n<meta property=\"og:description\" content=\"What is Double Asterisk (**) in python ? - python interview coding question ? - In Python ** is an exponential operator. The double asterisk form of **kwargs is used to pass a keyword\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-18T14:56:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-09T10:54:09+00:00\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\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:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"What is Double Asterisk (**) in python ?\",\"datePublished\":\"2021-07-18T14:56:56+00:00\",\"dateModified\":\"2021-09-09T10:54:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/\"},\"wordCount\":173,\"commentCount\":0,\"keywords\":[\"* in python arguments\",\"Accenture interview questions and answers\",\"Applied Materials interview questions and answers\",\"Atos interview questions and answers\",\"Capgemini interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"Chetu interview questions and answers\",\"Collabera Technologies interview questions and answers\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"double asterisk in python\",\"Flipkart interview questions and answers\",\"Genpact interview questions and answers\",\"IBM interview questions and answers\",\"Indecomm Global Services interview questions and answers\",\"Infosys Technologies interview questions and answers\",\"L&amp;T Infotech interview questions and answers\",\"Mavenir interview questions and answers\",\"Mphasis interview questions and answers\",\"NetApp interview questions and answers\",\"Oracle Corporation interview questions and answers\",\"PeopleStrong interview questions and answers\",\"Persistent Systems interview questions and answers\",\"Prokarma Softech Pvt Ltd interview questions and answers\",\"python asterisk argument\",\"python asterisk list\",\"python data science interview questions\",\"python double asterisk math\",\"python interview questions and answers for testers\",\"python multiple arguments command line\",\"python operators\",\"python pass args and kwargs to another function\",\"python programming questions\",\"python telephonic interview questions\",\"Reliance Industries Ltd interview questions and answers\",\"SAP Labs India Pvt Ltd interview questions and answers\",\"Tech Mahindra interview questions and answers\",\"UnitedHealth Group interview questions and answers\",\"Virtusa Consulting Services Pvt Ltd interview questions and answers\",\"Wells Fargo interview questions and answers\",\"Xoriant Soluti interview questions and answers\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/\",\"name\":\"What is Double Asterisk (**) in python ? - python interview coding question\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"datePublished\":\"2021-07-18T14:56:56+00:00\",\"dateModified\":\"2021-09-09T10:54:09+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is Double Asterisk (**) in python ? - python interview coding question ? - In Python ** is an exponential operator. The double asterisk form of **kwargs is used to pass a keyword\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-double-asterisk-in-python\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Double Asterisk (**) in python ? - python interview coding question","description":"What is Double Asterisk (**) in python ? - python interview coding question ? - In Python ** is an exponential operator. The double asterisk form of **kwargs is used to pass a keyword","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:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/","og_locale":"en_US","og_type":"article","og_title":"What is Double Asterisk (**) in python ? - python interview coding question","og_description":"What is Double Asterisk (**) in python ? - python interview coding question ? - In Python ** is an exponential operator. The double asterisk form of **kwargs is used to pass a keyword","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/","og_site_name":"Wikitechy","article_published_time":"2021-07-18T14:56:56+00:00","article_modified_time":"2021-09-09T10:54:09+00:00","author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"What is Double Asterisk (**) in python ?","datePublished":"2021-07-18T14:56:56+00:00","dateModified":"2021-09-09T10:54:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/"},"wordCount":173,"commentCount":0,"keywords":["* in python arguments","Accenture interview questions and answers","Applied Materials interview questions and answers","Atos interview questions and answers","Capgemini interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","Chetu interview questions and answers","Collabera Technologies interview questions and answers","Dell International Services India Pvt Ltd interview questions and answers","double asterisk in python","Flipkart interview questions and answers","Genpact interview questions and answers","IBM interview questions and answers","Indecomm Global Services interview questions and answers","Infosys Technologies interview questions and answers","L&amp;T Infotech interview questions and answers","Mavenir interview questions and answers","Mphasis interview questions and answers","NetApp interview questions and answers","Oracle Corporation interview questions and answers","PeopleStrong interview questions and answers","Persistent Systems interview questions and answers","Prokarma Softech Pvt Ltd interview questions and answers","python asterisk argument","python asterisk list","python data science interview questions","python double asterisk math","python interview questions and answers for testers","python multiple arguments command line","python operators","python pass args and kwargs to another function","python programming questions","python telephonic interview questions","Reliance Industries Ltd interview questions and answers","SAP Labs India Pvt Ltd interview questions and answers","Tech Mahindra interview questions and answers","UnitedHealth Group interview questions and answers","Virtusa Consulting Services Pvt Ltd interview questions and answers","Wells Fargo interview questions and answers","Xoriant Soluti interview questions and answers"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/","name":"What is Double Asterisk (**) in python ? - python interview coding question","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2021-07-18T14:56:56+00:00","dateModified":"2021-09-09T10:54:09+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is Double Asterisk (**) in python ? - python interview coding question ? - In Python ** is an exponential operator. The double asterisk form of **kwargs is used to pass a keyword","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-double-asterisk-in-python\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=878"}],"version-history":[{"count":4,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/878\/revisions"}],"predecessor-version":[{"id":3223,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/878\/revisions\/3223"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}