{"id":753,"date":"2022-02-21T18:09:00","date_gmt":"2022-02-21T12:39:00","guid":{"rendered":"https:\/\/geekpython.in\/?p=753"},"modified":"2023-08-15T17:06:21","modified_gmt":"2023-08-15T11:36:21","slug":"python-bitwise-operators-with-examples-explained-in-detail","status":"publish","type":"post","link":"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail","title":{"rendered":"Python Bitwise Operators With Examples &#8211; Explained In Detail"},"content":{"rendered":"\n<p>In Python, there are different types of operators are there which help us in carrying out different operations from&nbsp;<strong>arithmetic<\/strong>&nbsp;to&nbsp;<strong>comparison<\/strong>&nbsp;and from&nbsp;<strong>identity<\/strong>&nbsp;to&nbsp;<strong>membership<\/strong>&nbsp;operations.<\/p>\n\n\n\n<p>These operators use special symbols and reserved keywords to perform specific operations on values and variables.<\/p>\n\n\n\n<p>Operators that operate on a value are known as&nbsp;<strong>operands<\/strong>.<\/p>\n\n\n\n<p>Like these operators, Python has a built-in operator that operates on&nbsp;<strong>bits<\/strong>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-introduction\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-introduction\"><\/a>Introduction<\/h1>\n\n\n\n<p>Like all the operators in Python, there are\u00a0<strong>Bitwise Operators<\/strong>\u00a0that are used to perform the\u00a0<strong>bitwise calculations<\/strong>\u00a0on the integer values.<\/p>\n\n\n\n<p>As it depicts from its name, this operator&nbsp;<strong>converts the integer values into the binary format<\/strong>&nbsp;and&nbsp;<strong>then performs bit by bit operation on it and again returns the result in decimal format.<\/strong><\/p>\n\n\n\n<p>Why convert it into a binary format?<\/p>\n\n\n\n<p>There are 2 types of number systems:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Denary (0 &#8211; 9)<\/li>\n\n\n\n<li>Binary (0 and 1)<\/li>\n<\/ul>\n\n\n\n<p>Well, we humans understand and use the number system that has ten digits (0-9) in our everyday life. But what about computers?&nbsp;<strong>So computers work by manipulating 1s and 0s and these are binary digits,<\/strong>&nbsp;or&nbsp;<strong>bits<\/strong>&nbsp;for short.<\/p>\n\n\n\n<p>Now you&#8217;ve got the idea that to perform the bitwise calculation on integer values, the computer translates into 1s and 0s which is pretty understandable by the computers.<\/p>\n\n\n\n<p>There are 6 types of Bitwise operations:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Operator<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Syntax<\/strong><\/td><\/tr><\/thead><tbody><tr><td><code><strong>&amp;<\/strong><\/code><\/td><td><strong>Bitwise AND<\/strong><\/td><td><code><strong>x &amp; y<\/strong><\/code><\/td><\/tr><tr><td><code><strong>|<\/strong><\/code><\/td><td><strong>Bitwise OR<\/strong><\/td><td><code><strong>x | y<\/strong><\/code><\/td><\/tr><tr><td><code><strong>~<\/strong><\/code><\/td><td><strong>Bitwise NOT<\/strong><\/td><td><code><strong>~x<\/strong><\/code><\/td><\/tr><tr><td><code><strong>^<\/strong><\/code><\/td><td><strong>Bitwise XOR<\/strong><\/td><td><code><strong>x ^ y<\/strong><\/code><\/td><\/tr><tr><td><code><strong>&gt;&gt;<\/strong><\/code><\/td><td><strong>Bitwise right shift<\/strong><\/td><td><code><strong>x&gt;&gt;<\/strong><\/code><\/td><\/tr><tr><td><code><strong>&lt;&lt;<\/strong><\/code><\/td><td><strong>Bitwise left shift<\/strong><\/td><td><code><strong>x&lt;&lt;<\/strong><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Let&#8217;s discuss them one by one.<\/p>\n\n\n\n<p><strong>Note: Bitwise operator works only on&nbsp;<code>int<\/code>&nbsp;(integer) type otherwise&nbsp;<code>TypeError<\/code>&nbsp;will be raised<\/strong>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-bitwise-and-operator\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-bitwise-and-operator\"><\/a>Bitwise AND operator<\/h1>\n\n\n\n<p>Bitwise AND operators are represented by the&nbsp;<strong>&#8220;&amp;&#8221;<\/strong>&nbsp;(ampersand) sign.<\/p>\n\n\n\n<p>When we perform the Bitwise AND operation on values it&nbsp;<strong>returns 1 if both the bits are 1 else it will return 0<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">x = 5  # 0101 (binary)\ny = 6  # 0110 (binary)\n\noutput = x &amp; y\nprint(output)\n\n&gt;&gt;&gt; 4<\/pre><\/div>\n\n\n\n<p>The output will be 4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1080\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/and.png\" alt=\"\" class=\"wp-image-756\"\/><\/figure>\n\n\n\n<p>There you can see that it&nbsp;<strong>returns 1 when the binary digits at 2<sup>nd<\/sup>&nbsp;index from right both are 1 and returns 0 when either of the bits is 0 and the other is 1<\/strong>.<\/p>\n\n\n\n<p>If we see it arithmetically, then the equation is<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"160\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/and1.png\" alt=\"\" class=\"wp-image-757\"\/><\/figure>\n\n\n\n<p>Here,&nbsp;<code>x<\/code>&nbsp;and&nbsp;<code>y<\/code>&nbsp;are the integer values that are converted into binary format, and&nbsp;<code>index<\/code>&nbsp;is the index number of binary digits.<\/p>\n\n\n\n<p>If we try to gain results using this equation, so the process will be<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"800\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/and2.png\" alt=\"\" class=\"wp-image-758\"\/><\/figure>\n\n\n\n<p>Now you got a pretty good idea of what is happening behind the scenes.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-bitwise-or-operator\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-bitwise-or-operator\"><\/a>Bitwise OR operator<\/h1>\n\n\n\n<p>Bitwise OR operators are represented by the&nbsp;<strong>&#8220;|&#8221;<\/strong>&nbsp;(pipe) sign.<\/p>\n\n\n\n<p>Bitwise OR operator&nbsp;<strong>returns 1 if any of the bits is 1<\/strong>&nbsp;else&nbsp;<strong>it will return 0.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">x = 5  # 0101 (binary)\ny = 6  # 0110 (binary)\n\noutput = x | y\nprint(output)\n\n&gt;&gt;&gt; 7<\/pre><\/div>\n\n\n\n<p>The output will be 7<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1080\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/or.png\" alt=\"\" class=\"wp-image-759\"\/><\/figure>\n\n\n\n<p>Here, it&nbsp;<strong>returns 1 when either of the bits is 1 else returned 0<\/strong>.<\/p>\n\n\n\n<p>Arithmetic equation<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"160\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/or1.png\" alt=\"\" class=\"wp-image-760\"\/><\/figure>\n\n\n\n<p>Performing equation on binary digit<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"800\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/or2.png\" alt=\"\" class=\"wp-image-761\"\/><\/figure>\n\n\n\n<p>Here we performed a simple arithmetic operation.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-bitwise-not-operator\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-bitwise-not-operator\"><\/a>Bitwise NOT operator<\/h1>\n\n\n\n<p>Bitwise NOT operators are represented by the&nbsp;<strong>&#8220;~&#8221;<\/strong>&nbsp;(invert) sign.<\/p>\n\n\n\n<p>It uses the unary ( ~ ) invert operator and inverts all the bits.<\/p>\n\n\n\n<p>The result is returned after performing this equation<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"160\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/not.png\" alt=\"\" class=\"wp-image-762\"\/><\/figure>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">x = 5  # 0101 (binary)\n\noutput = ~x\nprint(output)\n\n&gt;&gt;&gt; -6<\/pre><\/div>\n\n\n\n<p>As you already saw the equation above, let&#8217;s see how it happened behind the scene<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1080\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/not1.png\" alt=\"\" class=\"wp-image-763\"\/><\/figure>\n\n\n\n<p>Now if you are wondering how&nbsp;<code>0101<\/code>&nbsp;+&nbsp;<code>1<\/code>&nbsp;=&nbsp;<code>0110<\/code>&nbsp;why not&nbsp;<code>0101<\/code>&nbsp;+&nbsp;<code>1<\/code>&nbsp;=&nbsp;<code>0102<\/code>?<\/p>\n\n\n\n<p>If we add&nbsp;<code>1<\/code>&nbsp;+&nbsp;<code>1<\/code>&nbsp;in binary then we&#8217;ll get&nbsp;<code>10<\/code>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Binary addition only has three rules:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>0 + 0 = 0<\/li>\n\n\n\n<li>0 + 1 = 1 or 1 + 0 = 1<\/li>\n\n\n\n<li>1 + 1 = 10&nbsp;<a target=\"_blank\" href=\"https:\/\/study.com\/academy\/lesson\/how-to-add-binary-numbers.html\" rel=\"noreferrer noopener\">Source<\/a><\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<p>If we see it arithmetically then the process will be the same as above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"800\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/not2.png\" alt=\"\" class=\"wp-image-764\"\/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-bitwise-xor-operator\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-bitwise-xor-operator\"><\/a>Bitwise XOR operator<\/h1>\n\n\n\n<p>Bitwise XOR operators are represented by the&nbsp;<strong>&#8220;^&#8221;<\/strong>&nbsp;(circumflex) sign.<\/p>\n\n\n\n<p>Bitwise XOR operator&nbsp;<strong>returns 1 if either of the bit is 0 and the other bit is 1<\/strong>&nbsp;else&nbsp;<strong>it will return 0 if both the bits are the same i.e., both the bits are 0 or 1<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">x = 5  # 0101 (binary)\ny = 6  # 0110 (binary)\n\noutput = x ^ y\nprint(output)\n\n&gt;&gt;&gt; 3<\/pre><\/div>\n\n\n\n<p>The output will be 3<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1080\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/xor.png\" alt=\"\" class=\"wp-image-765\"\/><\/figure>\n\n\n\n<p>The arithmetic equation will be<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"160\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/xor1.png\" alt=\"\" class=\"wp-image-766\"\/><\/figure>\n\n\n\n<p>The equation looks pretty simple but&nbsp;<strong>one thing to keep in mind is the ( % ) sign there is not for calculating the percentage of the value<\/strong>, it is&nbsp;<strong>modulo<\/strong>&nbsp;that&nbsp;<strong>returns the remainder<\/strong>&nbsp;of the Dividend and the Divisor.<\/p>\n\n\n\n<p><strong>Python has a built-in modulo operator<\/strong>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The % (modulo) operator yields the remainder from the division of the first argument by the second. The numeric arguments are first converted to a common type.&nbsp;<a target=\"_blank\" href=\"https:\/\/docs.python.org\/3\/reference\/expressions.html#binary-arithmetic-operations\" rel=\"noreferrer noopener\">Source<\/a><\/p>\n<\/blockquote>\n\n\n\n<p>Let&#8217;s see how to do it to get the result<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"800\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/xor2.png\" alt=\"\" class=\"wp-image-767\"\/><\/figure>\n\n\n\n<p>Here you can see&nbsp;<strong>we got 1 when we perform 1 % 2 (1 modulo 2)<\/strong>. When we&nbsp;<strong>perform simple division then we get 0.5 as quotient and the remainder will be 0<\/strong>&nbsp;but when we&nbsp;<strong>perform 1 % 2 in Python then we&#8217;ll get 1 in the console<\/strong>.<\/p>\n\n\n\n<p>Give it a try in your Python program.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-bitwise-left-shift-operator\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-bitwise-left-shift-operator\"><\/a>Bitwise Left Shift operator<\/h1>\n\n\n\n<p>Bitwise left shift operators are represented by the&nbsp;<strong>&#8220;&lt;&lt;&#8220;<\/strong>&nbsp;sign.<\/p>\n\n\n\n<p>If you look carefully, then you&#8217;ll see it like it is indicating to shift left. Well, it does the same as it is looking.<\/p>\n\n\n\n<p>Bitwise left shift operator&nbsp;<strong>shifts the left operand to the left, the number of times specified in the right operand<\/strong>.<\/p>\n\n\n\n<p>In simple terminology, the specified number of 0s is appended at the end of the binary number.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">x = 5  # 0101 (binary)\n\noutput = x&lt;&lt;2\nprint(output)\n\n&gt;&gt;&gt; 20<\/pre><\/div>\n\n\n\n<p>The output will be 20.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1080\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/ls.png\" alt=\"\" class=\"wp-image-768\"\/><\/figure>\n\n\n\n<p>In the above example, 00 (2) zeros are appended at the end by shifting the binary digit to the left.<\/p>\n\n\n\n<p>It also has an equation and we can get results by doing it arithmetically<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"160\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/ls1.png\" alt=\"\" class=\"wp-image-769\"\/><\/figure>\n\n\n\n<p>Here&nbsp;<code>x<\/code>&nbsp;is a binary digit and&nbsp;<code>n<\/code>&nbsp;is the number of times to be shifted.<\/p>\n\n\n\n<p>Arithmetically, the binary digit is multiplied by the 2 raised to the power&nbsp;<code>n<\/code>.<\/p>\n\n\n\n<p>If we try to gain results arithmetically, then the process will be<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"800\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/ls2.png\" alt=\"\" class=\"wp-image-770\"\/><\/figure>\n\n\n\n<p>If you are unable to understand the multiplication of binary digits then refer to the articles on google.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-bitwise-right-shift-operator\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-bitwise-right-shift-operator\"><\/a>Bitwise Right Shift operator<\/h1>\n\n\n\n<p>Bitwise right shift operators are represented by the&nbsp;<strong>&#8220;&gt;&gt;&#8221;<\/strong>&nbsp;sign.<\/p>\n\n\n\n<p>If you look carefully, then you&#8217;ll see it like it is indicating to shift right. Well, it does the same as it is looking.<\/p>\n\n\n\n<p>Bitwise right shift operator&nbsp;<strong>shifts the left operand to the right, the number of times specified in the right operand<\/strong>.<\/p>\n\n\n\n<p>In simple terminology, right side bits are removed.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">x = 5  # 0101 (binary)\n\noutput = x&gt;&gt;2\nprint(output)\n\n&gt;&gt;&gt; 1<\/pre><\/div>\n\n\n\n<p>The output will be 1<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"1080\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/rs.png\" alt=\"\" class=\"wp-image-771\"\/><\/figure>\n\n\n\n<p>Well if we see the equation, it is a bit different from the left shift operator equation<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"160\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/rs1.png\" alt=\"\" class=\"wp-image-772\"\/><\/figure>\n\n\n\n<p>In the left shift operator equation, we multiplied the binary digit from 2 raised to the power&nbsp;<code>n<\/code>, we are doing the same thing here but instead of multiplying we are dividing.<\/p>\n\n\n\n<p>Let&#8217;s see how we can perform it arithmetically<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"800\" src=\"https:\/\/geekpython.in\/wp-content\/uploads\/2023\/08\/rs2.png\" alt=\"\" class=\"wp-image-773\"\/><\/figure>\n\n\n\n<p>If you don&#8217;t know how to divide the binary digits then refer to the relevant articles.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"heading-conclusion\"><a href=\"https:\/\/geekpython.in\/python-bitwise-operators-with-examples-explained-in-detail#heading-conclusion\"><\/a>Conclusion<\/h1>\n\n\n\n<p>You have learned what can bitwise operators do and how they run equations behind the scenes.<\/p>\n\n\n\n<p>Understanding Bitwise operations lets you unlock your knowledge to manipulate binary digits using different bitwise operators in your Python code.<\/p>\n\n\n\n<p>Go ahead and start working on binary numbers in your Python program and make good use of your knowledge.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>That&#8217;s all for this article<\/strong><\/p>\n\n\n\n<p><strong>Keep Coding\u270c\u270c<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Python, there are different types of operators are there which help us in carrying out different operations from&nbsp;arithmetic&nbsp;to&nbsp;comparison&nbsp;and from&nbsp;identity&nbsp;to&nbsp;membership&nbsp;operations. These operators use special symbols and reserved keywords to perform specific operations on values and variables. Operators that operate on a value are known as&nbsp;operands. Like these operators, Python has a built-in operator that operates [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":755,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[2],"tags":[12],"class_list":["post-753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python","entry","has-media"],"_links":{"self":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts\/753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/comments?post=753"}],"version-history":[{"count":3,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts\/753\/revisions"}],"predecessor-version":[{"id":1381,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/posts\/753\/revisions\/1381"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/media\/755"}],"wp:attachment":[{"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/media?parent=753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/categories?post=753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekpython.in\/wp-json\/wp\/v2\/tags?post=753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}