{"id":31,"date":"2018-12-24T04:03:12","date_gmt":"2018-12-24T04:03:12","guid":{"rendered":"http:\/\/gantovnik.com\/bio-tips\/?p=31"},"modified":"2018-12-24T04:03:23","modified_gmt":"2018-12-24T04:03:23","slug":"getting-a-substring","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/getting-a-substring\/","title":{"rendered":"Getting a Substring"},"content":{"rendered":"<pre>#Getting a Substring\nString1 = \"One two three\"\nPrint(Strin1[:2]) #On\nPrint(Strin1[8:]) #three<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#Getting a Substring String1 = &#8220;One two three&#8221; Print(Strin1[:2]) #On Print(Strin1[8:]) #three<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[3],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-python","tag-python"],"modified_by":null,"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-v","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":33,"url":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/splitting-text\/","url_meta":{"origin":31,"position":0},"title":"Splitting Text","author":"gantovnik","date":"2018-12-24","format":false,"excerpt":"String1 = \"split second\" print(String1.split()) #['split', 'second']","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":37,"url":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/trimming-white-space\/","url_meta":{"origin":31,"position":1},"title":"Trimming White Space","author":"gantovnik","date":"2018-12-24","format":false,"excerpt":"string1 = \"Space \" string2 = string1.strip() print(string2)","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":29,"url":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/concatenating-strings\/","url_meta":{"origin":31,"position":2},"title":"Concatenating Strings","author":"gantovnik","date":"2018-12-24","format":false,"excerpt":"#Concatenating strings string1 = \"hello \" string2 = \"world\" new_string = string1 + string2 print(new_string)","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1853,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/05\/347-operations-with-sets-in-python\/","url_meta":{"origin":31,"position":3},"title":"#347 Operations with sets in python","author":"gantovnik","date":"2023-05-21","format":false,"excerpt":"ex347.py","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1718,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/12\/204-mandelbrot-fractal-using-python-2-2-2-2-2-2\/","url_meta":{"origin":31,"position":4},"title":"#325 Finding the intersection points between two functions using python","author":"gantovnik","date":"2022-12-13","format":false,"excerpt":"","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/12\/ex325.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/12\/ex325.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/12\/ex325.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":10318,"url":"https:\/\/gantovnik.com\/bio-tips\/2025\/08\/461-how-to-merge-two-dictionaries-in-python\/","url_meta":{"origin":31,"position":5},"title":"#461 How to Merge Two Dictionaries in Python","author":"gantovnik","date":"2025-08-23","format":false,"excerpt":"Merging dictionaries is a common task in Python programming. Suppose you have two separate dictionaries and want to combine them into one. In Python 3.9 and later, this is very easy thanks to the union operator (|). # Two sample dictionaries dic_1 = {'x1': 1, 'x2': 2} dic_2 = {'y1':\u2026","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}