<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1025235229134900490</id><updated>2024-09-05T19:31:59.944+05:30</updated><category term="Programming"/><category term="Programming Language"/><category term="Python"/><category term="Tutorial"/><title type='text'>Coding With Mj</title><subtitle type='html'>Welcome to my Blog account......&#xa;All types of code such as Python, HTML, JavaScript ,C++ are post here.........&#xa;Follow me.......&#xa;And Support me..........</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-1150599293956160014</id><published>2020-09-13T14:28:00.009+05:30</published><updated>2020-09-13T14:28:45.974+05:30</updated><title type='text'> Try Except, Raise an exception, String Formatting in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;Try Except:-&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 16.8px; padding-left: 4px; padding-right: 4px;&quot;&gt;try&lt;/code&gt;&amp;nbsp;block lets you test a block of code for errors.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 16.8px; padding-left: 4px; padding-right: 4px;&quot;&gt;except&lt;/code&gt;&amp;nbsp;block lets you handle the error.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 16.8px; padding-left: 4px; padding-right: 4px;&quot;&gt;finally&lt;/code&gt;&amp;nbsp;block lets you execute code, regardless of the result of the try- and except blocks.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;Exception Handling&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;When an error occurs, or exception as we call it, Python will normally stop and generate an error message.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;These exceptions can be handled using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;try&lt;/code&gt;&amp;nbsp;statement:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;try&lt;/code&gt;&amp;nbsp;block will generate an exception, because&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;x&lt;/code&gt;&amp;nbsp;is not defined:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;try&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;except&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;An exception occurred&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Since the try block raises an error, the except block will be executed.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Without the try block, the program will crash and raise an error:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example w3-pale-red&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;This statement will raise an error, because&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;x&lt;/code&gt;&amp;nbsp;is not defined:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh w3-border-red&quot; style=&quot;border-color: rgb(244, 67, 54) rgb(244, 67, 54) rgb(244, 67, 54) rgb(40, 44, 52); border-left-style: solid; border-left-width: 4px; box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: red; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia; font-size: x-large;&quot;&gt;Many Exceptions&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;You can define as many exception blocks as you want, e.g. if you want to execute a special block of code for a special kind of error:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Print one message if the try block raises a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;NameError&lt;/code&gt;&amp;nbsp;and another for other errors:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;try&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;except&lt;/span&gt;&amp;nbsp;NameError:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Variable x is not defined&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;except&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Something else went wrong&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;box-sizing: inherit; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Else&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;You can use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;else&lt;/code&gt;&amp;nbsp;keyword to define a block of code to be executed if no errors were raised:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;In this example, the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;try&lt;/code&gt;&amp;nbsp;block does not generate any error:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;try&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Hello&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;except&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Something went wrong&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;else&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Nothing went wrong&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;Finally&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;finally&lt;/code&gt;&amp;nbsp;block, if specified, will be executed regardless if the try block raises an error or not.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d0e0e3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;try&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;except&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Something went wrong&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;finally&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The &#39;try except&#39; is finished&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;This can be useful to close objects and clean up resources:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Try to open and write to a file that is not writable:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;try&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp; f =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;demofile.txt&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp; f.write(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Lorum Ipsum&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;except&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Something went wrong when writing to the file&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;finally&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp; f.close()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;The program can continue, without leaving the file object open.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;box-sizing: inherit; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Raise an exception&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;As a Python developer you can choose to throw an exception if a condition occurs.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;To throw (or raise) an exception, use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;raise&lt;/code&gt;&amp;nbsp;keyword.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Raise an error and stop the program if x is lower than 0:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x = -&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;if&lt;/span&gt;&amp;nbsp;x &amp;lt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;0&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;raise&lt;/span&gt;&amp;nbsp;Exception(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Sorry, no numbers below zero&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;raise&lt;/code&gt;&amp;nbsp;keyword is used to raise an exception.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;You can define what kind of error to raise, and the text to print to the user.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Raise a TypeError if x is not an integer:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;hello&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;if&lt;/span&gt;&amp;nbsp;not&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;type&lt;/span&gt;(x) is&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;int&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;raise&lt;/span&gt;&amp;nbsp;TypeError(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Only integers are allowed&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;User Input:-&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;User Input&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python allows for user input.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;That means we are able to ask the user for input.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The method is a bit different in Python 3.6 than Python 2.7.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python 3.6 uses the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;input()&lt;/code&gt;&amp;nbsp;method.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python 2.7 uses the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;raw_input()&lt;/code&gt;&amp;nbsp;method.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The following example asks for the username, and when you entered the username, it gets printed on the screen:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Python 3.7&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;username =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;input&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Enter username:&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Username is: &quot;&lt;/span&gt;&amp;nbsp;+ username)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;String Formatting:-&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;To make sure a string will display as expected, we can format the result with the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 16.8px; padding-left: 4px; padding-right: 4px;&quot;&gt;format()&lt;/code&gt;&amp;nbsp;method.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;String format()&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;format()&lt;/code&gt;&amp;nbsp;method allows you to format selected parts of a string.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Sometimes there are parts of a text that you do not control, maybe they come from a database, or user input?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;To control such values, add placeholders (curly brackets&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;{}&lt;/code&gt;) in the text, and run the values through the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;format()&lt;/code&gt;&amp;nbsp;method:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Add a placeholder where you want to display the price:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;price =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;49&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The price is {} dollars&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(txt.&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;format&lt;/span&gt;(price))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;You can add parameters inside the curly brackets to specify how to convert the value:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Format the price to be displayed as a number with two decimals:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The price is {:.2f} dollars&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;Multiple Values&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If you want to use more values, just add more values to the format() method:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(txt.&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;format&lt;/span&gt;(price, itemno, count))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;box-sizing: inherit; font-family: &amp;quot;segoe ui&amp;quot;, arial, sans-serif; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;Example&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;quantity =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;3&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;itemno =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;567&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;price =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;49&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;myorder =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;I want {} pieces of item number {} for {:.2f} dollars.&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(myorder.&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;format&lt;/span&gt;(quantity, itemno, price))&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia; font-size: x-large;&quot;&gt;Index Numbers&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;You can use index numbers (a number inside the curly brackets&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;{0}&lt;/code&gt;) to be sure the values are placed in the correct placeholders:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;quantity =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;3&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;itemno =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;567&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;price =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;49&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;myorder =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;I want {0} pieces of item number {1} for {2:.2f} dollars.&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(myorder.&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;format&lt;/span&gt;(quantity, itemno, price))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia; font-size: x-large;&quot;&gt;Named Indexes&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;You can also use named indexes by entering a name inside the curly brackets&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;{carname}&lt;/code&gt;, but then you must use names when you pass the parameter values&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;txt.format(carname = &quot;Ford&quot;)&lt;/code&gt;:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;myorder =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;I have a {carname}, it is a {model}.&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(myorder.&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;format&lt;/span&gt;(carname&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;=&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Ford&quot;&lt;/span&gt;, model =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Mustang&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/1150599293956160014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/try-except-raise-exception-string.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1150599293956160014'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1150599293956160014'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/try-except-raise-exception-string.html' title=' Try Except, Raise an exception, String Formatting in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-8532732084488526739</id><published>2020-09-13T14:21:00.000+05:30</published><updated>2020-09-13T14:21:08.797+05:30</updated><title type='text'>Python PIP</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;PIP:-&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;What is PIP?&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;PIP is a package manager for Python packages, or modules if you like.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;If you have Python version 3.4 or later, PIP is included by default.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;What is a Package?&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;A package contains all the files you need for a module.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Modules are Python code libraries you can include in your project.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Check if PIP is Installed&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Navigate your command line to the location of Python&#39;s script directory, and type the following:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Check PIP version:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate w3-black&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;C:\Users\&lt;em style=&quot;box-sizing: inherit;&quot;&gt;Your Name&lt;/em&gt;\AppData\Local\Programs\Python\Python36-32\Scripts&amp;gt;pip --version&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Install PIP&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If you do not have PIP installed, you can download and install it from this page:&lt;/span&gt;&lt;span face=&quot;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://pypi.org/project/pip/&quot; style=&quot;color: #551a8b; font-family: arial, sans-serif;&quot;&gt;https://pypi.org/project/pip/&lt;/a&gt;&lt;span style=&quot;font-family: arial, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-family: verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Download a Package&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Downloading a package is very easy.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Open the command line interface and tell PIP to download the package you want.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Navigate your command line to the location of Python&#39;s script directory, and type the following:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Download a package named &quot;camelcase&quot;:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate w3-black&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;C:\Users\&lt;em style=&quot;box-sizing: inherit;&quot;&gt;Your Name&lt;/em&gt;\AppData\Local\Programs\Python\Python36-32\Scripts&amp;gt;pip install camelcase&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Now you have downloaded and installed your first package!&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;Using a Package&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Once the package is installed, it is ready to use.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Import the &quot;camelcase&quot; package into your project.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Import and use &quot;camelcase&quot;:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;camelcase&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;c = camelcase.CamelCase()&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;hello world&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(c.hump(txt))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Find Packages&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Find more packages at&lt;/span&gt;&lt;span face=&quot;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://pypi.org/&quot; style=&quot;background-color: transparent; box-sizing: inherit; font-family: verdana, sans-serif;&quot; target=&quot;_blank&quot;&gt;https://pypi.org/&lt;/a&gt;&lt;span face=&quot;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-family: verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Remove a Package&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;uninstall&lt;/code&gt;&amp;nbsp;command to remove a package:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Uninstall the package named &quot;camelcase&quot;:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate w3-black&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;C:\Users\&lt;em style=&quot;box-sizing: inherit;&quot;&gt;Your Name&lt;/em&gt;\AppData\Local\Programs\Python\Python36-32\Scripts&amp;gt;pip uninstall camelcase&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The PIP Package Manager will ask you to confirm that you want to remove the camelcase package:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;div class=&quot;w3-code notranslate w3-black&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;Uninstalling camelcase-02.1:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp; Would remove:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c:\users\&lt;em style=&quot;box-sizing: inherit;&quot;&gt;Your Name&lt;/em&gt;\appdata\local\programs\python\python36-32\lib\site-packages\camecase-0.2-py3.6.egg-info&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c:\users\&lt;em style=&quot;box-sizing: inherit;&quot;&gt;Your Name&lt;/em&gt;\appdata\local\programs\python\python36-32\lib\site-packages\camecase\*&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;Proceed (y/n)?&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Press&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;y&lt;/code&gt;&amp;nbsp;and the package will be removed.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;List Packages&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;list&lt;/code&gt;&amp;nbsp;command to list all the packages installed on your system:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;List installed packages:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate w3-black&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;C:\Users\&lt;em style=&quot;box-sizing: inherit;&quot;&gt;Your Name&lt;/em&gt;\AppData\Local\Programs\Python\Python36-32\Scripts&amp;gt;pip list&lt;/div&gt;&lt;p style=&quot;box-sizing: inherit; font-family: verdana, sans-serif; margin-bottom: 1em; margin-top: 1em;&quot;&gt;Result:&lt;/p&gt;&lt;div class=&quot;w3-code notranslate w3-black&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;Package&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;-----------------------&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;camelcase&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.2&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;mysql-connector 2.1.6&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;pip&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18.1&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;pymongo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.6.1&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;setuptools&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 39.0.1&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/8532732084488526739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-pip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/8532732084488526739'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/8532732084488526739'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-pip.html' title='Python PIP'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-708857469229266005</id><published>2020-09-13T14:15:00.001+05:30</published><updated>2020-09-13T14:15:10.515+05:30</updated><title type='text'>findall, search, split, sub Function in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;The findall() Function&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;findall()&lt;/code&gt;&amp;nbsp;function returns a list containing all matches.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Print a list of all matches:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.findall(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;ai&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The list contains the matches in the order they are found.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If no matches are found, an empty list is returned:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Return an empty list if no match was found:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.findall(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Portugal&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;The search() Function&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;search()&lt;/code&gt;&amp;nbsp;function searches the string for a match, and returns a&amp;nbsp;&lt;a href=&quot;https://www.w3schools.com/python/python_regex.asp#matchobject&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;Match object&lt;/a&gt;&amp;nbsp;if there is a match.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If there is more than one match, only the first occurrence of the match will be returned:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Search for the first white-space character in the string:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.search(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\s&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The first white-space character is located in position:&quot;&lt;/span&gt;, x.start())&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If no matches are found, the value&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;None&lt;/code&gt;&amp;nbsp;is returned:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Make a search that returns no match:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.search(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Portugal&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;The split() Function&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;split()&lt;/code&gt;&amp;nbsp;function returns a list where the string has been split at each match:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Split at each white-space character:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.split(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\s&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;You can control the number of occurrences by specifying the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;maxsplit&lt;/code&gt;&amp;nbsp;parameter:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Split the string only at the first occurrence:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.split(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\s&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;The sub() Function&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;sub()&lt;/code&gt;&amp;nbsp;function replaces the matches with the text of your choice:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Replace every white-space character with the number 9:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.sub(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\s&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;9&quot;&lt;/span&gt;, txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;You can control the number of replacements by specifying the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;count&lt;/code&gt;&amp;nbsp;parameter:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Replace the first 2 occurrences:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.sub(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\s&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;9&quot;&lt;/span&gt;, txt,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;Match Object&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;A Match Object is an object containing information about the search and the result.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: #fcff01;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;If there is no match, the value&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;None&lt;/code&gt;&amp;nbsp;will be returned, instead of the Match Object.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Do a search that will return a Match Object:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue; font-family: Consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;&amp;nbsp;re&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;txt =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown; font-family: Consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;x = re.search(&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown; font-family: Consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot;ai&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt)&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue; font-family: Consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;(x)&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;&lt;span style=&quot;font-family: Consolas, courier new;&quot;&gt;#th&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;is will print an object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The Match object has properties and methods used to retrieve information about the search, and the result:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;.span()&lt;/code&gt;&amp;nbsp;returns a tuple containing the start-, and end positions of the match.&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;.string&lt;/code&gt;&amp;nbsp;returns the string passed into the function&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;.group()&lt;/code&gt;&amp;nbsp;returns the part of the string where there was a match&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Print the position (start- and end-position) of the first match occurrence.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;The regular expression looks for any words that start with an upper case &quot;S&quot;:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x = re.search(r&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\bS\w+&quot;&lt;/span&gt;, txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;x.span()&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Print the string passed into the function:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x = re.search(r&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\bS\w+&quot;&lt;/span&gt;, txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;x.string&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Print the part of the string where there was a match.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The regular expression looks for any words that start with an upper case &quot;S&quot;:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x = re.search(r&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\bS\w+&quot;&lt;/span&gt;, txt)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;x.group()&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span style=&quot;background-color: #ffffcc; box-sizing: inherit; color: black; font-family: georgia; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&lt;span style=&quot;background-color: #ffffcc; color: black; font-family: georgia;&quot;&gt;&amp;nbsp;If there is no match, the value&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;None&lt;/code&gt;&lt;span style=&quot;background-color: #ffffcc; color: black; font-family: georgia;&quot;&gt;&amp;nbsp;will be returned, instead of the Match Object.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/708857469229266005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/findall-search-split-sub-function-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/708857469229266005'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/708857469229266005'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/findall-search-split-sub-function-in.html' title='findall, search, split, sub Function in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-869813633512527836</id><published>2020-09-13T14:11:00.007+05:30</published><updated>2020-09-13T14:11:55.756+05:30</updated><title type='text'>Metacharacters, Special Sequences, Sets in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia; font-size: x-large;&quot;&gt;Metacharacters&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Metacharacters are characters with a special meaning:&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 120px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Character&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 120px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 75px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;[]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;A set of characters&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;[a-m]&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Signals a special sequence (can also be used to escape special characters)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\d&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;.&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Any character (except newline character)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;he..o&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;^&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Starts with&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;^hello&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;$&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Ends with&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;world$&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Zero or more occurrences&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;aix*&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;+&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;One or more occurrences&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;aix+&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;{}&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Exactly the specified number of occurrences&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;al{2}&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;|&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Either or&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;falls|stays&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;()&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Capture and group&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Special Sequences&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;A special sequence is a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;\&lt;/code&gt;&amp;nbsp;followed by one of the characters in the list below, and has a special meaning:&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 120px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Character&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 120px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 75px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\A&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match if the specified characters are at the beginning of the string&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\AThe&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\b&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the specified characters are at the beginning or at the end of a word&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;(the &quot;r&quot; in the beginning is making sure that the string is being treated as a &quot;raw string&quot;)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;r&quot;\bain&quot;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;r&quot;ain\b&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\B&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the specified characters are present, but NOT at the beginning (or at the end) of a word&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;(the &quot;r&quot; in the beginning is making sure that the string is being treated as a &quot;raw string&quot;)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;r&quot;\Bain&quot;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;r&quot;ain\B&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\d&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the string contains digits (numbers from 0-9)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\d&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\D&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the string DOES NOT contain digits&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\D&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\s&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the string contains a white space character&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\s&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\S&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the string DOES NOT contain a white space character&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\S&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\w&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the string contains any word characters (characters from a to Z, digits from 0-9, and the underscore _ character)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\w&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\W&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match where the string DOES NOT contain any word characters&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;\W&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;\Z&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Returns a match if the specified characters are at the end of the string&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&quot;Spain\Z&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Sets&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;A set is a set of characters inside a pair of square brackets&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;[]&lt;/code&gt;&amp;nbsp;with a special meaning:&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 120px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Set&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 75px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[arn]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match where one of the specified characters (&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;r&lt;/code&gt;, or&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;n&lt;/code&gt;) are present&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[a-n]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match for any lower case character, alphabetically between&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;n&lt;/code&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[^arn]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match for any character EXCEPT&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;r&lt;/code&gt;, and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;n&lt;/code&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[0123]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match where any of the specified digits (&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;0&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;1&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;2&lt;/code&gt;, or&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;3&lt;/code&gt;) are present&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[0-9]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match for any digit between&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;0&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;9&lt;/code&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[0-5][0-9]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match for any two-digit numbers from&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;00&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;59&lt;/code&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[a-zA-Z]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a match for any character alphabetically between&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;z&lt;/code&gt;, lower case OR upper case&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;[+]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In sets,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;+&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;*&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;.&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;|&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;()&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;$&lt;/code&gt;,&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;{}&lt;/code&gt;&amp;nbsp;has no special meaning, so&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;[+]&lt;/code&gt;&amp;nbsp;means: return a match for any&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;+&lt;/code&gt;&amp;nbsp;character in the string&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/869813633512527836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/metacharacters-special-sequences-sets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/869813633512527836'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/869813633512527836'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/metacharacters-special-sequences-sets.html' title='Metacharacters, Special Sequences, Sets in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-1659049804129663057</id><published>2020-09-13T14:09:00.005+05:30</published><updated>2020-09-13T14:09:55.738+05:30</updated><title type='text'>Python RegEx Module...</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;RegEx:-&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;A RegEx, or Regular Expression, is a sequence of characters that forms a search pattern.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;RegEx can be used to check if a string contains the specified search pattern.&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-family: &amp;quot;segoe ui&amp;quot;, arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;RegEx Module&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python has a built-in package called&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;re&lt;/code&gt;, which can be used to work with Regular Expressions.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Import the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;re&lt;/code&gt;&amp;nbsp;module:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;re&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;RegEx in Python&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;When you have imported the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;re&lt;/code&gt;&amp;nbsp;module, you can start using regular expressions:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Search the string to see if it starts with &quot;The&quot; and ends with &quot;Spain&quot;:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;re&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;txt =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The rain in Spain&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = re.search(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;^The.*Spain$&quot;&lt;/span&gt;, txt)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;RegEx Functions&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;re&lt;/code&gt;&amp;nbsp;module offers a set of functions that allows us to search a string for a match:&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 120px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Function&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #f1f1f1; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/python_regex.asp#findall&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;findall&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a list containing all matches&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/python_regex.asp#search&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;search&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a&amp;nbsp;&lt;a href=&quot;https://www.w3schools.com/python/python_regex.asp#matchobject&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;Match object&lt;/a&gt;&amp;nbsp;if there is a match anywhere in the string&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #f1f1f1; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/python_regex.asp#split&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;split&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Returns a list where the string has been split at each match&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/python_regex.asp#sub&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;sub&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Replaces one or many matches with a string&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/1659049804129663057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-regex-module.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1659049804129663057'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1659049804129663057'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-regex-module.html' title='Python RegEx Module...'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-6473884931606656321</id><published>2020-09-13T12:45:00.002+05:30</published><updated>2020-09-13T12:45:37.449+05:30</updated><title type='text'>Modules in Python</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What is a Module?&lt;/span&gt;&lt;/i&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;Consider a module to be the same as a code library.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;A file containing a set of functions you want to include in your application.&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Create a Module:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;To create a module just save the code you want in a file with the file extension&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;.py&lt;/code&gt;:&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Save this code in a file named&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;mymodule.py&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: mediumblue; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: #d9d2e9;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;greeting(name):&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot; /&gt;&lt;span style=&quot;background-color: #d9d2e9; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: mediumblue; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;background-color: #d9d2e9; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #b45f06;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: brown; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot;Hello, &quot;&lt;/span&gt;&lt;span style=&quot;background-color: #d9d2e9; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #b45f06;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #d9d2e9; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #d9d2e9; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #d9d2e9; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #b45f06;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: #d9d2e9; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #b45f06;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Use a Module:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;Now we can use the module we just created, by using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;import&lt;/code&gt;&amp;nbsp;statement:&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Import the module named mymodule, and call the greeting function:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #93c47d; box-sizing: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: white;&quot;&gt;mymodule&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span style=&quot;color: white;&quot;&gt;mymodule.greeting(&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Jonathan&quot;&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;When using a function from a module, use the syntax:&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;module_name.function_name&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Variables in Module&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The module can contain functions, as already described, but also variables of all types (arrays, dictionaries, objects etc):&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Save this code in the file&lt;/span&gt;&lt;span face=&quot;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;mymodule.py&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #f3f3f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;person1 = {&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;name&quot;&lt;/span&gt;:&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;age&quot;&lt;/span&gt;:&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;36&lt;/span&gt;,&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;country&quot;&lt;/span&gt;:&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Norway&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Import the module named mymodule, and access the person1 dictionary:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: white; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;mymodule&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;a = mymodule.person1[&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;age&quot;&lt;/span&gt;]&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(a)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Python Datetime:-&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;A date in Python is not a data type of its own, but we can import a module named&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime&lt;/code&gt;&amp;nbsp;to work with dates as date objects.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Import the datetime module and display the current date:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: white; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;datetime&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = datetime.datetime.now()&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large; font-weight: normal;&quot;&gt;&lt;i&gt;Date Output:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;When we execute the code from the example above the result will be:&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;2020-08-13 12:30:24.912671&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The date contains year, month, day, hour, minute, second, and microsecond.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime&lt;/code&gt;&amp;nbsp;module has many methods to return information about the date object.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Here are a few examples, you will learn more about them later in this chapter:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Return the year and name of weekday:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: white; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;datetime&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = datetime.datetime.now()&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x.year)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x.strftime(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;%A&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Creating Date Objects&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;To create a date, we can use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime()&lt;/code&gt;&amp;nbsp;class (constructor) of the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime&lt;/code&gt;&amp;nbsp;module.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime()&lt;/code&gt;&amp;nbsp;class requires three parameters to create a date: year, month, day.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Create a date object:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: white; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;datetime&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = datetime.datetime(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2020&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;17&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime()&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;class also takes parameters for time and timezone (hour, minute, second, microsecond, tzone), but they are optional, and has a default value of&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;0&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;, (&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;None&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;for timezone).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;The strftime() Method&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;datetime&lt;/code&gt;&amp;nbsp;object has a method for formatting date objects into readable strings.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The method is called&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;strftime()&lt;/code&gt;, and takes one parameter,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;format&lt;/code&gt;, to specify the format of the returned string:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Display the name of the month:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: white; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;datetime&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = datetime.datetime(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2018&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;6&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x.strftime(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;%B&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;A reference of all the legal format codes:&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 917.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 229.6px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Directive&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 321.6px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 274.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 91.2px;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%a&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Weekday, short version&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Wed&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%A&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Weekday, full version&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Wednesday&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%w&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Weekday as a number 0-6, 0 is Sunday&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%d&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Day of month 01-31&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;31&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%b&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Month name, short version&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Dec&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%B&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Month name, full version&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;December&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%m&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Month as a number 01-12&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;12&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Year, short version, without century&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;18&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%Y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Year, full version&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;2018&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%H&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Hour 00-23&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;17&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%I&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Hour 00-12&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;05&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%p&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;AM/PM&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;PM&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%M&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Minute 00-59&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;41&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%S&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Second 00-59&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;08&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%f&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Microsecond 000000-999999&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;548513&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%z&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;UTC offset&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;+0100&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%Z&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Timezone&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;CST&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%j&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Day number of year 001-366&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;365&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%U&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Week number of year, Sunday as the first day of week, 00-53&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;52&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%W&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Week number of year, Monday as the first day of week, 00-53&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;52&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%c&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Local version of date and time&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Mon Dec 31 17:41:00 2018&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%x&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Local version of date&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;12/31/18&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%X&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Local version of time&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;17:41:00&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%%&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;A % character&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;Math:-&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: black; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python has a set of built-in math functions, including an extensive math module, that allows you to perform mathematical tasks on numbers.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: black; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Built-in Math Functions:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;min()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;max()&lt;/code&gt;&amp;nbsp;functions can be used to find the lowest or highest value in an iterable:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia; font-size: large;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #f3f3f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;min&lt;/span&gt;(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;10&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;25&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;y =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;max&lt;/span&gt;(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;10&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;25&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(y)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;abs()&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;function returns the absolute (positive) value of the specified number:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;color: black; font-family: georgia; font-size: 24px;&quot;&gt;Example&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #f3f3f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;abs&lt;/span&gt;(-&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;7.25&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;color: black; font-family: georgia; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pow(&lt;em style=&quot;box-sizing: inherit;&quot;&gt;x&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;y&lt;/em&gt;)&lt;/code&gt;&amp;nbsp;function returns the value of x to the power of y (x&lt;span style=&quot;box-sizing: inherit; font-size: 11.25px; line-height: 0; position: relative; top: -0.5em; vertical-align: baseline;&quot;&gt;y&lt;/span&gt;).&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Return the value of 4 to the power of 3 (same as 4 * 4 * 4):&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;pow&lt;/span&gt;(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;4&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;3&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span face=&quot;&quot; style=&quot;color: black;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;The Math Module&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python has also a built-in module called&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math&lt;/code&gt;, which extends the list of mathematical functions.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;To use it, you must import the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math&lt;/code&gt;&amp;nbsp;module:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ffe599; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;math&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;When you have imported the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math&lt;/code&gt;&amp;nbsp;module, you can start using methods and constants of the module.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math.sqrt()&lt;/code&gt;&amp;nbsp;method for example, returns the square root of a number:&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;math&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = math.sqrt(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;64&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math.ceil()&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;method rounds a number upwards to its nearest integer, and the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math.floor()&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;method rounds a number downwards to its nearest integer, and returns the result:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;math&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = math.ceil(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1.4&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;y = math.floor(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1.4&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&amp;nbsp;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# returns 2&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(y)&amp;nbsp;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# returns 1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;math.pi&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;constant, returns the value of PI (3.14...):&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;math&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = math.pi&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;JSON:-&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: x-large;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;JSON is a syntax for storing and exchanging data.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;JSON is text, written with JavaScript object notation.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;JSON in Python&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python has a built-in package called&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;json&lt;/code&gt;, which can be used to work with JSON data.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Import the json module:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;json&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-family: &amp;quot;segoe ui&amp;quot;, arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Parse JSON - Convert from JSON to Python&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If you have a JSON string, you can parse it by using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;json.loads()&lt;/code&gt;&amp;nbsp;method.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;The result will be a&amp;nbsp;&lt;a href=&quot;https://www.w3schools.com/python/python_dictionaries.asp&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;Python dictionary&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Convert from JSON to Python:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;json&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# some JSON:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;x =&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&#39;{ &quot;name&quot;:&quot;John&quot;, &quot;age&quot;:30, &quot;city&quot;:&quot;New York&quot;}&#39;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# parse x:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;y = json.loads(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# the result is a Python dictionary:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(y[&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;age&quot;&lt;/span&gt;])&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Convert from Python to JSON&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If you have a Python object, you can convert it into a JSON string by using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;json.dumps()&lt;/code&gt;&amp;nbsp;method.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Convert from Python to JSON:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;import&lt;/span&gt;&amp;nbsp;json&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# a Python object (dict):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;x = {&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;name&quot;&lt;/span&gt;:&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;age&quot;&lt;/span&gt;:&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;30&lt;/span&gt;,&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;city&quot;&lt;/span&gt;:&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;New York&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;}&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# convert into JSON:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;y = json.dumps(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;# the result is a JSON string:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(y)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/6473884931606656321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/modules-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/6473884931606656321'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/6473884931606656321'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/modules-in-python.html' title='Modules in Python'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-4317372042070131353</id><published>2020-09-13T12:36:00.002+05:30</published><updated>2020-09-13T12:36:11.482+05:30</updated><title type='text'>Python Classes and Objects</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i style=&quot;background-color: transparent;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python Classes/Objects:-&lt;/font&gt;&lt;/i&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python is an object oriented programming language.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Almost everything in Python is an object, with its properties and methods.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A Class is like an object constructor, or a &quot;blueprint&quot; for creating objects.&lt;/font&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Create a Class:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;To create a class, use the keyword&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;class&lt;/code&gt;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Create a class named MyClass, with a property named x:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;MyClass:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp; x =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Create Object:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Now we can use the class named MyClass to create objects:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Create an object named p1, and print the value of x:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;span style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #d9ead3;&quot;&gt;p1 = MyClass()&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;background-color: #d9ead3;&quot;&gt;(p1.x)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The __init__() Function:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The examples above are classes and objects in their simplest form, and are not really useful in real life applications.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;To understand the meaning of classes we have to understand the built-in __init__() function.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;All classes have a function called __init__(), which is always executed when the class is being initiated.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Use the __init__() function to assign values to object properties, or other operations that are necessary to do when the object is being created:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Create a class named Person, use the __init__() function to assign values for name and age:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Person:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, name, age):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;self.name = name&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.age = age&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;p1 = Person(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;36&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(p1.name)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(p1.age)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function is called automatically every time the class is being used to create a new object.&lt;/p&gt;&lt;/div&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-family: verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Object Methods:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Objects can also contain methods. Methods in objects are functions that belong to the object.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Let us create a method in the Person class:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Insert a function that prints a greeting, and execute it on the p1 object:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Person:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, name, age):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;self.name = name&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.age = age&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;myfunc(self):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Hello my name is &quot;&lt;/span&gt;&amp;nbsp;+ self.name)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;p1 = Person(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;36&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;p1.myfunc()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;midcontentadcontainer&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin-left: -20px; margin-right: -20px; overflow: auto; text-align: center;&quot;&gt;&lt;div data-google-query-id=&quot;CMXd4PHhhesCFZUGtwAdPvUDSA&quot; id=&quot;snhb-mid_content-0&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;self&lt;/code&gt;&amp;nbsp;parameter is a reference to the current instance of the class, and is used to access variables that belong to the class.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The self Parameter:-&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;self&lt;/code&gt;&amp;nbsp;parameter is a reference to the current instance of the class and is used to access variables that belong to the class.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;It does not have to be named&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;self&lt;/code&gt;&amp;nbsp;, you can call it whatever you like, but it has to be the first parameter of any function in the class:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Use the words&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;mysillyobject&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;abc&lt;/em&gt;&amp;nbsp;instead of&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;self&lt;/em&gt;&lt;/font&gt;&lt;/span&gt;&lt;span face=&quot;&quot; style=&quot;background-color: #f1f1f1;&quot;&gt;:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Person:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(mysillyobject, name, age):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;mysillyobject.name = name&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mysillyobject.age = age&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;myfunc(abc):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Hello my name is &quot;&lt;/span&gt;&amp;nbsp;+ abc.name)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;p1 = Person(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;36&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;p1.myfunc()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Modify Object Properties:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can modify properties on objects like this:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Set the age of p1 to 40:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;p1.age =&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;40&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Delete Object Properties:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can delete properties on objects by using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;del&lt;/code&gt;&amp;nbsp;keyword:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Delete the age property from the p1 object:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;del&lt;/span&gt;&amp;nbsp;p1.age&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Delete Objects:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can delete objects by using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;del&lt;/code&gt;&amp;nbsp;keyword:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Delete the p1 object:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;del&lt;/span&gt;&amp;nbsp;p1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The pass Statement:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;class&lt;/code&gt;&amp;nbsp;definitions cannot be empty, but if you for some reason have a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;class&lt;/code&gt;&amp;nbsp;definition with no content, put in the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pass&lt;/code&gt;&amp;nbsp;statement to avoid getting an error.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Person:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;pass&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Python Inheritance:-&lt;/i&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Inheritance allows us to define a class that inherits all the methods and properties from another class.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Parent class&lt;/span&gt;&amp;nbsp;is the class being inherited from, also called base class.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Child class&lt;/span&gt;&amp;nbsp;is the class that inherits from another class, also called derived class.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Create a Parent Class&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Any class can be a parent class, so the syntax is the same as creating any other class:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: #f1f1f1; box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Create a class named&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Person&lt;/code&gt;, with&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;firstname&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;lastname&lt;/code&gt;&amp;nbsp;properties, and a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;printname&lt;/code&gt;&amp;nbsp;method:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Person:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;self.firstname = fname&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.lastname = lname&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;printname(self):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(self.firstname,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;self.lastname)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;#Use the Person class to create an object, and then execute the printname method:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = Person(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Doe&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x.printname()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;Create a Child Class:-&lt;/span&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;To create a class that inherits the functionality from another class, send the parent class as a parameter when creating the child class:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Create a class named&lt;/span&gt;&lt;span style=&quot;background-color: #f1f1f1;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Student&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;, which will inherit the properties and methods from the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Person&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;class:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;pass&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: #ffffcc; box-sizing: inherit; color: black; font-size: 15px; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&lt;span style=&quot;background-color: #ffffcc; color: black; font-size: 15px;&quot;&gt;&amp;nbsp;Use the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pass&lt;/code&gt;&lt;span style=&quot;background-color: #ffffcc; color: black; font-size: 15px;&quot;&gt;&amp;nbsp;keyword when you do not want to add any other properties or methods to the class.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Now the Student class has the same properties and methods as the Person class.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Student&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;class to create an object, and then execute the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;printname&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;method:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x = Student(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Olsen&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x.printname()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Add the __init__() Function:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;So far we have created a child class that inherits the properties and methods from its parent.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;We want to add the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function to the child class (instead of the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pass&lt;/code&gt;&amp;nbsp;keyword).&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function is called automatically every time the class is being used to create a new object.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Add the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;function to the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Student&lt;/code&gt;&amp;nbsp;class:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;commentcolor&quot; style=&quot;box-sizing: inherit; color: green;&quot;&gt;#add properties etc.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;When you add the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function, the child class will no longer inherit the parent&#39;s&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;The child&#39;s&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;overrides&lt;/span&gt;&amp;nbsp;the inheritance of the parent&#39;s&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;To keep the inheritance of the parent&#39;s&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function, add a call to the parent&#39;s&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;Person.__init__(self, fname, lname)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Now we have successfully added the __init__() function, and kept the inheritance of the parent class, and we are ready to add functionality in the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;__init__()&lt;/code&gt;&amp;nbsp;function.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Use the super() Function:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Python also has a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;super()&lt;/code&gt;&amp;nbsp;function that will make the child class inherit all the methods and properties from its parent:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;super&lt;/span&gt;().__init__(fname, lname)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;By using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;super()&lt;/code&gt;&amp;nbsp;function, you do not have to use the name of the parent element, it will automatically inherit the methods and properties from its parent.&lt;/span&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Add Properties:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Add a property called&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;graduationyear&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;to the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Student&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;class:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;super&lt;/span&gt;().__init__(fname, lname)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.graduationyear&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;=&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2019&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In the example below, the year&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;2019&lt;/code&gt;&amp;nbsp;should be a variable, and passed into the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Student&lt;/code&gt;&amp;nbsp;class when creating student objects. To do so, add another parameter in the __init__() function:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Add a&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;year&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;parameter, and pass the correct year when creating objects:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname, year):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;super&lt;/span&gt;().__init__(fname, lname)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.graduationyear&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;= year&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;x = Student(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Olsen&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2019&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia; font-size: large;&quot;&gt;&lt;i&gt;Add Methods:-&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Add a method called&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;welcome&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;to the&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;Student&lt;/code&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;class:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d0e0e3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Student(Person):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(self, fname, lname, year):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;super&lt;/span&gt;().__init__(fname, lname)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.graduationyear&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;= year&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;welcome(self):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Welcome&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;self.firstname, self.lastname,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;to the class of&quot;&lt;/span&gt;, self.graduationyear)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If you add a method in the child class with the same name as a function in the parent class, the inheritance of the parent method will be overridden.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/4317372042070131353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-classes-and-objects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/4317372042070131353'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/4317372042070131353'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-classes-and-objects.html' title='Python Classes and Objects'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-8360773402187349165</id><published>2020-09-13T12:32:00.004+05:30</published><updated>2020-09-13T12:32:43.153+05:30</updated><title type='text'>Python Arrays and Array Methods...</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Arrays:-&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;This page shows you how to use LISTS as ARRAYS, however, to work with arrays in Python you will have to import a library, like the&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/numpy_intro.asp&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;NumPy library&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-family: verdana, sans-serif; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;Arrays are used to store multiple values in one single variable:&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Create an array containing car names:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;cars = [&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Ford&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Volvo&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;BMW&quot;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;,&amp;nbsp;&lt;font color=&quot;#cc0000&quot;&gt;&quot;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font color=&quot;#cc0000&quot; face=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;lamborghini&lt;/span&gt;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px;&quot;&gt;&lt;font color=&quot;#cc0000&quot;&gt;&quot;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px;&quot;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;What is an Array?&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;An array is a special variable, which can hold more than one value at a time.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code w3-border notranslate jsHigh&quot; style=&quot;border-color: rgb(204, 204, 204) rgb(204, 204, 204) rgb(204, 204, 204) rgb(40, 44, 52); border-image: initial !important; border-style: solid; border-width: 1px; box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;jscolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit;&quot;&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;car1 =&amp;nbsp;&lt;span class=&quot;jsstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Ford&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;car2 =&amp;nbsp;&lt;span class=&quot;jsstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Volvo&quot;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;car3 =&amp;nbsp;&lt;span class=&quot;jsstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;BMW&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;jsstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;car4 =&amp;nbsp;&lt;font color=&quot;#990000&quot;&gt;&quot;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;lamborghini&quot;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;However, what if you want to loop through the cars and find a specific one? And what if you had not 3 cars, but 300?&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The solution is an array!&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;An array can hold many values under a single name, and you can access the values by referring to an index number.&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Adding Array Elements:-&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;append()&lt;/code&gt;&amp;nbsp;method to add an element to an array.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Add one more element to the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;cars&lt;/code&gt;&amp;nbsp;array:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;cars.append(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Removing Array Elements:-&lt;/i&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pop()&lt;/code&gt;&amp;nbsp;method to remove an element from the array.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Delete the second element of the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;cars&lt;/code&gt;&amp;nbsp;array:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;cars.pop(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Array Methods:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Python has a set of built-in methods that you can use on lists/arrays.&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Method&lt;/font&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Description&lt;/font&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_append.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;append()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Adds an element at the end of the list&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_clear.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;clear()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Removes all the elements from the list&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_copy.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;copy()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Returns a copy of the list&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_count.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;count()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Returns the number of elements with the specified value&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_extend.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;extend()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Add the elements of a list (or any iterable), to the end of the current list&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_index.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;index()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Returns the index of the first element with the specified value&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_insert.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;insert()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Adds an element at the specified position&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_pop.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;pop()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Removes the element at the specified position&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_remove.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;remove()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Removes the first item with the specified value&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_reverse.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;reverse()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Reverses the order of the list&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_list_sort.asp&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;sort()&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Sorts the list&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/8360773402187349165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-arrays-and-array-methods.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/8360773402187349165'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/8360773402187349165'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-arrays-and-array-methods.html' title='Python Arrays and Array Methods...'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-681144247556008433</id><published>2020-09-13T12:29:00.001+05:30</published><updated>2020-09-13T12:29:13.553+05:30</updated><title type='text'>Recursion and Lambda function in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Recursion:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python also accepts function recursion, which means a defined function can call itself.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Recursion is a common mathematical and programming concept. It means that a function calls itself. This has the benefit of meaning that you can loop through data to reach a result.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The developer should be very careful with recursion as it can be quite easy to slip into writing a function which never terminates, or one that uses excess amounts of memory or processor power. However, when written correctly recursion can be a very efficient and mathematically-elegant approach to programming.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;In this example,&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;tri_recursion()&lt;/span&gt;&amp;nbsp;is a function that we have defined to call itself (&quot;recurse&quot;). We use the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;k&lt;/span&gt;&amp;nbsp;variable as the data, which decrements (&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;-1&lt;/span&gt;) every time we recurse. The recursion ends when the condition is not greater than 0 (i.e. when it is 0).&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;To a new developer it can take some time to work out how exactly this works, best way to find out is by testing and modifying it.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: #f1f1f1; box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Recursion Example&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate jsHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;jscolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;def tri_recursion(k):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;jskeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;if&lt;/span&gt;(k &amp;gt;&amp;nbsp;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;0&lt;/span&gt;):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = k + tri_recursion(k -&amp;nbsp;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;1&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(result)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;jskeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;else&lt;/span&gt;:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result =&amp;nbsp;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;0&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;jskeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;result&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;print(&lt;span class=&quot;jsstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;\n\nRecursion Example Results&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;tri_recursion(&lt;span class=&quot;jsnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;6&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;Lambda:-&lt;/span&gt;&lt;/font&gt;&lt;/i&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A lambda function is a small anonymous function.&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A lambda function can take any number of arguments, but can only have one expression.&lt;/font&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Syntax:-&lt;/font&gt;&lt;/h2&gt;&lt;div class=&quot;w3-code w3-border notranslate&quot; style=&quot;background-color: #282c34; border-color: rgb(204, 204, 204) rgb(204, 204, 204) rgb(204, 204, 204) rgb(40, 44, 52); border-image: initial !important; border-style: solid; border-width: 1px; box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;lambda&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;arguments&amp;nbsp;&lt;/em&gt;:&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;expression&lt;/em&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The expression is executed and the result is returned:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;A lambda function that adds 10 to the number passed in as an argument, and print the result:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;lambda&lt;/span&gt;&amp;nbsp;a : a +&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;10&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Lambda functions can take any number of arguments:&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A lambda function that sums argument a, b, and c and print the result:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #cfe2f3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;x =&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;lambda&lt;/span&gt;&amp;nbsp;a, b, c : a * b / c&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;6&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Why Use Lambda Functions?&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The power of lambda is better shown when you use them as an anonymous function inside another function.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Say you have a function definition that takes one argument, and that argument will be multiplied with an unknown number:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;myfunc(n):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;lambda&lt;/span&gt;&amp;nbsp;a : a * n&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/681144247556008433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/recursion-and-lambda-function-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/681144247556008433'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/681144247556008433'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/recursion-and-lambda-function-in-python.html' title='Recursion and Lambda function in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-3444144697301535213</id><published>2020-09-13T08:59:00.001+05:30</published><updated>2020-09-13T08:59:13.836+05:30</updated><title type='text'>Functions, Parameters or Arguments, Arbitrary Arguments *args, Arbitrary Keyword Arguments **kwargs in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;Functions:-&lt;/span&gt;&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A function is a block of code which only runs when it is called.&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can pass data, known as parameters, into a function.&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;intro&quot; style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 16px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A function can return data as a result.&lt;/font&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Creating a Function:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;In Python a function is defined using the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;def&lt;/span&gt;&amp;nbsp;keyword:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #f4cccc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function():&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Hello from a function&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Calling a Function:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;To call a function, use the function name followed by parenthesis:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;my_function():&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit; color: black;&quot; /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Hello from a function&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit; color: black;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit; color: black;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: inherit; color: black; font-weight: bolder;&quot;&gt;my_function()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Arguments:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Information can be passed into functions as arguments.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Arguments are specified after the function name, inside the parentheses. You can add as many arguments as you want, just separate them with a comma.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The following example has a function with one argument (fname). When the function is called, we pass along a first name, which is used inside the function to print the full name:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #eeeeee; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;fname&lt;/span&gt;):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(fname +&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot; Refsnes&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;my_function(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Emil&quot;&lt;/span&gt;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;my_function(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Tobias&quot;&lt;/span&gt;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;my_function(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Linus&quot;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Parameters or Arguments?&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The terms&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;parameter&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;argument&lt;/em&gt;&amp;nbsp;can be used for the same thing: information that are passed into a function.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-panel w3-note&quot; style=&quot;background-color: #ffffcc; border-left: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -32px; padding: 16px 32px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;From a function&#39;s perspective:&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A parameter is the variable listed inside the parentheses in the function definition.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;An argument is the value that is sent to the function when it is called.&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Number of Arguments:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;By default, a function must be called with the correct number of arguments. Meaning that if your function expects 2 arguments, you have to call the function with 2 arguments, not more, and not less.&lt;/font&gt;&lt;/p&gt;&lt;/h2&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;This function expects 2 arguments, and gets 2 arguments:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fff2cc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(fname, lname):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(fname +&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot; &quot;&lt;/span&gt;&amp;nbsp;+ lname)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;my_function(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Emil&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Refsnes&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/h2&gt;&lt;div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Arbitrary Arguments, *args:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If you do not know how many arguments that will be passed into your function, add a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;*&lt;/code&gt;&amp;nbsp;before the parameter name in the function definition.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;This way the function will receive a&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;tuple&lt;/em&gt;&amp;nbsp;of arguments, and can access the items accordingly:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;If the number of arguments is unknown, add a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;*&lt;/code&gt;&amp;nbsp;before the parameter name:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #fce5cd; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(*kids):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The youngest child is &quot;&lt;/span&gt;&amp;nbsp;+ kids[&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;2&lt;/span&gt;])&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;my_function(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Emil&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Tobias&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Linus&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;span face=&quot;&quot; style=&quot;background-color: white; color: black; font-size: 15px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Keyword Arguments:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can also send arguments with the&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;key&lt;/em&gt;&amp;nbsp;=&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;value&lt;/em&gt;&amp;nbsp;syntax.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;This way the order of the arguments does not matter.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9ead3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(child3, child2, child1):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;The youngest child is &quot;&lt;/span&gt;&amp;nbsp;+ child3)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;my_function(child1 =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Emil&quot;&lt;/span&gt;, child2 =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Tobias&quot;&lt;/span&gt;, child3 =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Linus&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Arbitrary Keyword Arguments, **kwargs:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If you do not know how many keyword arguments that will be passed into your function, add two asterisk:&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;**&lt;/code&gt;&amp;nbsp;before the parameter name in the function definition.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;This way the function will receive a&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;dictionary&lt;/em&gt;&amp;nbsp;of arguments, and can access the items accordingly:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: #f1f1f1; box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If the number of keyword arguments is unknown, add a double&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;**&lt;/code&gt;&amp;nbsp;before the parameter name:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(**kid):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;His last name is &quot;&lt;/span&gt;&amp;nbsp;+ kid[&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;lname&quot;&lt;/span&gt;])&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;my_function(fname =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Tobias&quot;&lt;/span&gt;, lname =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Refsnes&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Default Parameter Value:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The following example shows how to use a default parameter value.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If we call the function without argument, it uses the default value:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #ead1dc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;country =&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;&lt;span style=&quot;font-weight: 400;&quot;&gt;India&lt;/span&gt;&quot;&lt;/span&gt;&lt;/span&gt;):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;I am from &quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;country)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;my_function(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Sweden&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;my_function(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Norway&quot;&lt;/span&gt;)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;my_function()&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;my_function(&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;Brazil&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Passing a List as an Argument:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can send any data types of argument to a function (string, number, list, dictionary etc.), and it will be treated as the same data type inside the function.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;E.g. if you send a List as an argument, it will still be a List when it reaches the function:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d9d2e9; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(food):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;for&lt;/span&gt;&amp;nbsp;x&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;in&lt;/span&gt;&amp;nbsp;food:&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(x)&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;fruits = [&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;apple&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;banana&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown;&quot;&gt;&quot;cherry&quot;&lt;/span&gt;]&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;my_function(fruits)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Return Values:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;To let a function return a value, use the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;return&lt;/code&gt;&amp;nbsp;statement:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #d0e0e3; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;my_function(x):&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;&amp;nbsp;* x&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(my_function(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;3&lt;/span&gt;))&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(my_function(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;5&lt;/span&gt;))&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;print&lt;/span&gt;(my_function(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;9&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;The pass Statement:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;function&lt;/code&gt;&amp;nbsp;definitions cannot be empty, but if you for some reason have a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;function&lt;/code&gt;&amp;nbsp;definition with no content, put in the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pass&lt;/code&gt;&amp;nbsp;statement to avoid getting an error.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;box-shadow: none; box-sizing: inherit; color: black; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;background-color: #f1f1f1; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; color: white; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;background-color: #f4cccc; box-sizing: inherit; color: black;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;def&lt;/span&gt;&amp;nbsp;myfunction():&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; color: mediumblue;&quot;&gt;pass&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/3444144697301535213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/functions-parameters-or-arguments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/3444144697301535213'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/3444144697301535213'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/functions-parameters-or-arguments.html' title='Functions, Parameters or Arguments, Arbitrary Arguments *args, Arbitrary Keyword Arguments **kwargs in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-1424881830329172265</id><published>2020-09-13T08:55:00.003+05:30</published><updated>2020-09-13T08:55:53.145+05:30</updated><title type='text'>Loops in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Loops:-&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python has two primitive loop commands:&lt;/font&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;while&lt;/span&gt;&amp;nbsp;loops&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/span&gt;&amp;nbsp;loops&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;The while Loop&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;while&lt;/span&gt;&amp;nbsp;loop we can execute a set of statements as long as a condition is true.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print i as long as i is less than 6:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot; face=&quot;&quot;&gt;i =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;1&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;while&lt;/font&gt;&lt;/span&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i &amp;lt;&lt;/font&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;6&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot; face=&quot;&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font face=&quot;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot; face=&quot;&quot;&gt;(i)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;&amp;nbsp;i +=&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;1&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;while&lt;/span&gt;&amp;nbsp;loop requires relevant variables to be ready, in this example we need to define an indexing variable,&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;i&lt;/span&gt;, which we set to 1.&lt;/font&gt;&lt;/p&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;The break Statement&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;break&lt;/span&gt;&amp;nbsp;statement we can stop the loop even if the while condition is true:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Exit the loop when i is 3:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;i =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;1&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;while&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i &amp;lt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;6&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(i)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;i ==&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;3&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;break&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i +=&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;1&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;The continue Statement&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;continue&lt;/span&gt;&amp;nbsp;statement we can stop the current iteration, and continue with the next:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Continue to the next iteration if i is 3:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;i =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;0&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;while&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i &amp;lt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;6&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i +=&lt;/font&gt;&lt;font color=&quot;#04ff00&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;1&lt;/span&gt;&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i ==&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;3&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;continue&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(i)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;The else Statement&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;else&lt;/span&gt;&amp;nbsp;statement we can run a block of code once when the condition no longer is true:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print a message once the condition is false:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;i =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;1&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;while&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i &amp;lt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;6&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(i)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;i +=&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;1&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;else&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;i is no longer less than 6&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python For Loops:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/span&gt;&amp;nbsp;loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;This is less like the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/span&gt;&amp;nbsp;keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/span&gt;&amp;nbsp;loop we can execute a set of statements, once for each item in a list, tuple, set etc.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print each fruit in a fruit list:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;fruits = [&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;apple&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;]&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;x&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;fruits:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Looping Through a String:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Even strings are iterable objects, they contain a sequence of characters:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Loop through the letters in the word &quot;banana&quot;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;x&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The break Statement:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;break&lt;/span&gt;&amp;nbsp;statement we can stop the loop before it has looped through all the items:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Exit the loop when&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;x&lt;/code&gt;&amp;nbsp;is &quot;banana&quot;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;fruits = [&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;apple&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;]&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;fruits:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x)&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x ==&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;break&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The continue Statement:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;With the&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;continue&lt;/span&gt;&amp;nbsp;statement we can stop the current iteration of the loop, and continue with the next:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Do not print banana:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;fruits = [&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;apple&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;]&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;fruits:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;if&lt;/span&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x ==&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;continue&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The range() Function:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;font face=&quot;georgia&quot; style=&quot;color: #25265e;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;To loop through a set of code a specified number of times, we can use the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;range()&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;function,&lt;/span&gt;&lt;/font&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;range()&lt;/span&gt;&amp;nbsp;function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Using the range() function:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;x&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;range&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;6&lt;/span&gt;):&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;range()&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;function defaults to 0 as a starting value, however it is possible to specify the starting value by adding a parameter:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;range(2, 6)&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;, which means values from 2 to 6 (but not including 6):&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Else in For Loop:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;else&lt;/code&gt;&amp;nbsp;keyword in a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/code&gt;&amp;nbsp;loop specifies a block of code to be executed when the loop is finished:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print all numbers from 0 to 5, and print a message when the loop has ended:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;range&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;6&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;):&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;else&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;Finally finished!&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Nested Loops:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A nested loop is a loop inside a loop.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The &quot;inner loop&quot; will be executed one time for each iteration of the &quot;outer loop&quot;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print each adjective for every fruit:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;adj = [&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;red&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;big&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;tasty&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;]&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;fruits = [&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;apple&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&lt;font color=&quot;#04ff00&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;banana&quot;&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;]&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;x&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;adj:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;y&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;fruits:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x, y)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;The pass Statement:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/code&gt;&amp;nbsp;loops cannot be empty, but if you for some reason have a&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;for&lt;/code&gt;&amp;nbsp;loop with no content, put in the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pass&lt;/code&gt;&amp;nbsp;statement to avoid getting an error.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;[&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;0&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;1&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;2&lt;/span&gt;]:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;pass&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/1424881830329172265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/loops-in-python-37.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1424881830329172265'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1424881830329172265'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/loops-in-python-37.html' title='Loops in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-2252017620496589369</id><published>2020-09-13T08:53:00.005+05:30</published><updated>2020-09-13T08:53:51.086+05:30</updated><title type='text'>If statements, Elif, Else, Short Hand If, Short Hand If ... Else, And, Or, Nested If and The pass Statement in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Conditions and If statements:-&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python supports the usual logical conditions from mathematics:&lt;/font&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Equals:&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a == b&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Not Equals:&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a != b&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Less than:&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a &amp;lt; b&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Less than or equal to:&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a &amp;lt;= b&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Greater than:&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a &amp;gt; b&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Greater than or equal to:&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a &amp;gt;= b&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;These conditions can be used in several ways, most commonly in &quot;if statements&quot; and loops.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;An &quot;if statement&quot; is written by using the&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;if&lt;/span&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=&quot;georgia&quot;&gt;keyword.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If statement:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;200&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;b &amp;gt; a:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;b is greater than a&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;In this example we use two variables,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;, which are used as part of the if&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;statement to test&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;whether&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;is greater than&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;. As&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;is&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;33&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;is&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;,&lt;/span&gt;&lt;/font&gt;&lt;span face=&quot;&quot; style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;we know that 200 is greater than 33, and so we print to screen that &quot;b is greater than a&quot;.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Elif:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;elif&lt;/span&gt;&amp;nbsp;keyword is pythons way of saying &quot;if the previous conditions were not true, then try this condition&quot;.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-family: verdana, sans-serif; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-family: &amp;quot;segoe ui&amp;quot;, arial, sans-serif; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;Example&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;b &amp;gt; a:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;b is greater than a&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;elif&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;a == b:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;a and b are equal&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;In this example&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;is equal to&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;, so the first condition is not true, but the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;elif&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;condition is true, so we print to screen that &quot;a and b are equal&quot;.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Else:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;else&lt;/span&gt;&amp;nbsp;keyword catches anything which isn&#39;t caught by the preceding conditions.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;200&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;b &amp;gt; a:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;b is greater than a&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;elif&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;a == b:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;a and b are equal&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;else&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;a is greater than b&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;In this example&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;is greater than&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;, so the first condition is not true, also the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;elif&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;condition is not true, so we go to the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&amp;nbsp;condition and print to screen that &quot;a is greater than b&quot;.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Short Hand If in Python:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If you have only one statement to execute, you can put it on the same line as the if statement.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;One line if statement:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;a &amp;gt; b:&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;a is greater than b&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Short Hand If ... Else in Python:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;If you have only one statement to execute, one for if, and one for else, you can put it all on the same line:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;One line if else statement:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;2&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;330&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;A&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;a &amp;gt; b&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;else&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;B&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;And&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;span class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;and&lt;/span&gt;&amp;nbsp;keyword is a logical operator, and is used to combine conditional statements:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Test if&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;is greater than&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/code&gt;, AND if&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;c&lt;/code&gt;&amp;nbsp;is greater than&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;200&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;c =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;500&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;a &amp;gt; b and c &amp;gt; a:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;Both conditions are True&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Or&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;or&lt;/code&gt;&amp;nbsp;keyword is a logical operator, and is used to combine conditional statements:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Test if&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;is greater than&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;b&lt;/code&gt;, OR if&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;is greater than&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;c&lt;/code&gt;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;200&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;c =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;500&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;&amp;nbsp;a &amp;gt; b or a &amp;gt; c:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;At least one of the conditions is True&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Nested If&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can have&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;if&lt;/code&gt;&amp;nbsp;statements inside&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;if&lt;/code&gt;&amp;nbsp;statements, this is called&amp;nbsp;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;nested&lt;/em&gt;&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;if&lt;/code&gt;&amp;nbsp;statements.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;x =&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;41&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x &amp;gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;10&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;Above ten,&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;x &amp;gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;20&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;and also above 20!&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;else&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;but not above 20.&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;The pass Statement&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;if&lt;/code&gt;&amp;nbsp;statements cannot be empty, but if you for some reason have an&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;if&lt;/code&gt;&amp;nbsp;statement with no content, put in the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;pass&lt;/code&gt;&amp;nbsp;statement to avoid getting an error.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;a =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b =&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;200&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffa400&quot;&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;b &amp;gt; a:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&lt;font color=&quot;#ffa400&quot;&gt;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;pass&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/2252017620496589369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/if-statements-elif-else-short-hand-if.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/2252017620496589369'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/2252017620496589369'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/if-statements-elif-else-short-hand-if.html' title='If statements, Elif, Else, Short Hand If, Short Hand If ... Else, And, Or, Nested If and The pass Statement in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-3446628909219877152</id><published>2020-09-13T08:48:00.006+05:30</published><updated>2020-09-13T08:48:52.640+05:30</updated><title type='text'>Arrays, Tuple, Set, Dictionary in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Collections (Arrays):-&lt;/font&gt;&lt;/i&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;There are four collection data types in the Python programming language:&lt;/font&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;List&lt;/span&gt;&amp;nbsp;is a collection which is ordered and changeable. Allows duplicate members.&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Tuple&lt;/span&gt;&amp;nbsp;is a collection which is ordered and unchangeable. Allows duplicate members.&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Set&lt;/span&gt;&amp;nbsp;is a collection which is unordered and unindexed. No duplicate members.&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Dictionary&lt;/span&gt;&amp;nbsp;is a collection which is unordered, changeable and indexed. No duplicate members.&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;When choosing a collection type, it is useful to understand the properties of that type. Choosing the right type for a particular data set could mean retention of meaning, and, it could mean an increase in efficiency or security.&lt;/font&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python List:-&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A list is a collection which is ordered and changeable. In Python lists are written with square brackets.&lt;/font&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example:-&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Create a List:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;thislist = [&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;apple&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;]&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(thislist)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Tuple:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A tuple is a collection which is ordered and&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;unchangeable&lt;/span&gt;. In Python tuples are written with round brackets.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Create a Tuple:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;thistuple = (&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;apple&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&lt;font color=&quot;#04ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;banana&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(thistuple)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python Set:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A set is a collection that is unordered and unindexed. In Python sets are written with curly brackets.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Create a Set:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;thisset = {&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;apple&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;banana&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;cherry&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;}&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(thisset)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Python Dictionary:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A dictionary is a collection which is unordered, changeable and indexed. In Python dictionaries are written with curly brackets, and they have keys and values.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-example&quot; style=&quot;background-color: #f1f1f1; box-shadow: none; box-sizing: inherit; font-size: 15px; margin: 24px -20px; padding: 8px 20px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Create and print a dictionary:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;thisdict =&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;{&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: red;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;brand&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;font color=&quot;#04ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;Ford&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#04ff00&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;model&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;font color=&quot;#04ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;Mustang&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;,&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#04ff00&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;&quot;year&quot;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;font color=&quot;#04ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit; color: #04ff00;&quot;&gt;1964&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;}&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(thisdict)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/3446628909219877152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/arrays-tuple-set-dictionary-in-python-37.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/3446628909219877152'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/3446628909219877152'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/arrays-tuple-set-dictionary-in-python-37.html' title='Arrays, Tuple, Set, Dictionary in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-1108418223313027051</id><published>2020-09-13T08:46:00.004+05:30</published><updated>2020-09-13T08:46:43.955+05:30</updated><title type='text'>Python Operators</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h1&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Operators are used to performing operations on variables and values.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python divides the operators in the following groups:&lt;/font&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Arithmetic operators&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Assignment operators&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Comparison operators&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Logical operators&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Identity operators&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Membership operators&lt;/font&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Bitwise operators&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Arithmetic Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Arithmetic operators are used with numeric values to perform common mathematical operations:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 254.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 356px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Name&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 304.8px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 101.6px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;+&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Addition&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x + y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Subtraction&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x - y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Multiplication&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x * y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;/&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Division&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x / y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Modulus&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x % y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;**&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Exponentiation&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x ** y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;//&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Floor division&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x // y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Assignment Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Assignment operators are used to assign values to variables:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 338.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 271.2px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 271.2px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Same As&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 136px;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = 5&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = 5&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;+=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x += 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x + 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;-=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x -= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x - 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;*=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x *= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x * 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;/=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x /= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x / 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;%=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x %= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x % 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;//=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x //= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x // 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;**=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x **= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x ** 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;amp;=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;amp;= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x &amp;amp; 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;|=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x |= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x | 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;^=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x ^= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x ^ 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;gt;&amp;gt;=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;gt;&amp;gt;= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x &amp;gt;&amp;gt; 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;&amp;lt;=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;lt;&amp;lt;= 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = x &amp;lt;&amp;lt; 3&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Comparison Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Comparison operators are used to compare two values:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 254.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 356px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Name&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 304.8px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 101.6px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;==&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Equal&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x == y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;!=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Not equal&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x != y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Greater than&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;gt; y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Less than&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;lt; y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Greater than or equal to&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;gt;= y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Less than or equal to&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x &amp;lt;= y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Logical Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Logical operators are used to combining conditional statements:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 254.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 356px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 304.8px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 101.6px;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;and&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if both statements are true&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x &amp;lt; 5 and&amp;nbsp; x &amp;lt; 10&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;or&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if one of the statements is true&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x &amp;lt; 5 or x &amp;lt; 4&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;not&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Reverse the result, returns False if the result is true&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;not(x &amp;lt; 5 and x &amp;lt; 10)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Identity Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Identity operators are used to comparing the objects, not if they are equal, but if they are actually the same object, with the same memory location:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 254.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 356px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 304.8px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 101.6px;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;is&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if both variables are the same object&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;x is y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;is not&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if both variables are not the same object&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x is not y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Membership Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Membership operators are used to testing if a sequence is presented in an object:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 254.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 356px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 304.8px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 101.6px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;in&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if a sequence with the specified value is present in the object&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;x in y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;not in&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if a sequence with the specified value is not present in the object&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x not in y&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; font-family: &amp;quot;segoe ui&amp;quot;, arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Python Bitwise Operators:-&lt;/font&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Bitwise operators are used to comparing (binary) numbers:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 102.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Operator&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 152px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Name&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 762.4px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;amp;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;AND&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Sets each bit to 1 if both bits are 1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;|&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;OR&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Sets each bit to 1 if one of two bits is 1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;^&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;XOR&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Sets each bit to 1 if only one of two bits is 1&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;~&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;NOT&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Inverts all the bits&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Zero fill left shift&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Shift left by pushing zeros in from the right and let the leftmost bits fall off&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Signed right shift&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Shift right by pushing copies of the leftmost bit in from the left,&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; and let the rightmost bits fall off&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/1108418223313027051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1108418223313027051'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1108418223313027051'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/python-operators.html' title='Python Operators'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-2376268695744663794</id><published>2020-09-13T08:46:00.000+05:30</published><updated>2020-09-13T08:46:14.174+05:30</updated><title type='text'>Data-Types in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i&gt;Python Data-Types&lt;/i&gt;&lt;/font&gt;:-&lt;/h1&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;In programming, data type is an important concept.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Variables can store data of different types, and different types can do different things.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python has the following data types built-in by default, in these categories:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top; width: 160px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Text Type:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;str&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Numeric Types:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;int&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;float&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;complex&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Sequence Types:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;list&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;tuple&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;range&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Mapping Type:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;dict&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Set Types:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;set&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;frozenset&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Boolean Type:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;bool&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Binary Types:&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;bytes&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;bytearray&lt;/code&gt;,&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;memoryview&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Getting the Data Type:-&lt;/font&gt;&lt;/i&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can get the data type of any object by using the&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;type()&lt;/code&gt;&amp;nbsp;function:&lt;/font&gt;&lt;/p&gt;&lt;h4 style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Example:-&lt;/font&gt;&lt;/h4&gt;&lt;div&gt;&lt;p style=&quot;box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print the data type of the variable x:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;x&lt;/font&gt;&lt;/span&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;=&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;5&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;type&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(x))&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;box-sizing: inherit; color: black; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Setting the Data Type:-&lt;/i&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;In Python, the data type is set when you assign a value to a variable:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; id=&quot;dtref&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; min-width: 350px; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Data Type&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 90px;&quot;&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = &quot;Hello World&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;str&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = 20&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;int&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = 20.5&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;float&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = 1j&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;complex&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;list&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = (&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;tuple&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = range(6)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;range&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = {&quot;name&quot; : &quot;John&quot;, &quot;age&quot; : 36}&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;dict&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = {&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;}&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;set&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = frozenset({&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;})&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;frozenset&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = True&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;bool&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = b&quot;Hello&quot;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;bytes&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = bytearray(5)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;bytearray&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = memoryview(bytes(5))&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;memoryview&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-family: verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;div id=&quot;midcontentadcontainer&quot; style=&quot;box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin-left: -20px; margin-right: -20px; overflow: auto; text-align: center;&quot;&gt;&lt;div data-google-query-id=&quot;CM3m24zxgOsCFb8ItwAd1qcJ1Q&quot; id=&quot;snhb-mid_content-0&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;div id=&quot;google_ads_iframe_/22152718/sws-hb//w3schools.com//mid_content_0__container__&quot; style=&quot;border: 0pt none; box-sizing: inherit;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; color: black; font-family: verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h3 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot; style=&quot;background-color: white;&quot;&gt;Setting the Specific Data Type:-&lt;/font&gt;&lt;/i&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;If you want to specify the data type, you can use the following constructor functions:&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; id=&quot;dtref&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; min-width: 350px; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Example&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Data Type&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 90px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = str(&quot;Hello World&quot;)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;str&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = int(20)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;int&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = float(20.5)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;float&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = complex(1j)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;complex&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = list((&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;))&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;list&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = tuple((&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;))&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;tuple&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = range(6)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;range&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = dict(name=&quot;John&quot;, age=36)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;dict&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = set((&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;))&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;set&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = frozenset((&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;))&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;frozenset&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = bool(5)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;bool&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = bytes(5)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;bytes&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = bytearray(5)&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;bytearray&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.5px; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;x = memoryview(bytes(5))&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;memoryview&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h1 style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;font size=&quot;5&quot;&gt;Python Booleans&lt;/font&gt;:-&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;span style=&quot;color: black; font-size: 16px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Booleans represent one of two values:&lt;/font&gt;&lt;/span&gt;&lt;span face=&quot;&quot; style=&quot;color: black; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.8px; padding-left: 4px; padding-right: 4px;&quot;&gt;True&lt;/code&gt;&lt;span style=&quot;color: black; font-size: 16px;&quot;&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=&quot;georgia&quot;&gt;or&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 16.8px; padding-left: 4px; padding-right: 4px;&quot;&gt;False&lt;/code&gt;&lt;span face=&quot;&quot; style=&quot;color: black; font-size: 16px;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;Boolean Values:-&lt;/i&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;In programming you often need to know if an expression is&amp;nbsp;&lt;/font&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;True&lt;/code&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=&quot;georgia&quot;&gt;or&amp;nbsp;&lt;/font&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;False&lt;/code&gt;&lt;font face=&quot;&quot;&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;You can evaluate any expression in Python, and get one of two answers,&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;True&lt;/code&gt;&lt;font face=&quot;georgia&quot;&gt;&amp;nbsp;or&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;False&lt;/code&gt;&lt;font face=&quot;&quot;&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;When you compare two values, the expression is evaluated and Python returns the Boolean answer:&lt;/font&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i&gt;Example&lt;/i&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Print a message based on whether the condition is&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;True&lt;/code&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font face=&quot;georgia&quot;&gt;or&lt;/font&gt;&lt;font face=&quot;&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;False&lt;/code&gt;&lt;font face=&quot;&quot;&gt;:&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;w3-code notranslate pythonHigh&quot; style=&quot;background-color: #282c34; border-left: 4px solid rgb(40, 44, 52); box-sizing: inherit; font-family: consolas, &amp;quot;courier new&amp;quot;; font-size: 15px; margin-bottom: 16px; margin-top: 16px; overflow-wrap: break-word; padding: 8px 12px; width: auto;&quot;&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;a&lt;/font&gt;&lt;/span&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;=&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;200&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;font color=&quot;#ffffff&quot;&gt;b&lt;/font&gt;&lt;/span&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythoncolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;=&lt;/font&gt;&amp;nbsp;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;33&lt;/font&gt;&lt;/span&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;if&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;b &amp;gt; a:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;b is greater than a&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&lt;span class=&quot;pythonnumbercolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;else&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;:&lt;/font&gt;&lt;br style=&quot;box-sizing: inherit;&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;pythonkeywordcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#ffa400&quot;&gt;print&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;(&lt;/font&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit;&quot;&gt;&lt;font color=&quot;#04ff00&quot;&gt;&quot;b is not greater than a&quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/2376268695744663794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/data-types-in-python-37.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/2376268695744663794'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/2376268695744663794'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/data-types-in-python-37.html' title='Data-Types in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-1791923220668401870</id><published>2020-09-13T08:40:00.006+05:30</published><updated>2020-09-13T08:40:44.451+05:30</updated><title type='text'>Keywords, Built-in Exceptions, Built-in Functions in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1 style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;b&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;font size=&quot;5&quot;&gt;Python Keywords&lt;/font&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;:-&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Python has a set of keywords that are reserved words that cannot be used as variable names, function names, or any other identifiers:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 253.6px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Keyword&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_and.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;and&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;A logical operator&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_as.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;as&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To create an alias&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_assert.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;assert&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;For debugging&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_break.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;break&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To break out of a loop&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_class.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;class&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To define a class&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_continue.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;continue&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To continue to the next iteration of a loop&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_def.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;def&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To define a function&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_del.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;del&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To delete an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_elif.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;elif&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Used in conditional statements, same as else if&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_else.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;else&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Used in conditional statements&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_except.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;except&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Used with exceptions, what to do when an exception occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_false.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;False&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Boolean value, result of comparison operations&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_finally.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;finally&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Used with exceptions, a block of code that will be executed no matter if there&lt;br /&gt;&amp;nbsp;is an exception or not.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_for.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;for&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To create a for loop&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_from.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;from&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To import specific parts of a module&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_global.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;global&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To declare a global variable&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_if.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;if&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To make a conditional statement&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_import.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;import&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To import a module&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_in.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;in&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To check if a value is present in a list, tuple, etc.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_is.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;is&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To test if two variables are equal&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_lambda.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;lambda&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To create an anonymous function&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_none.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;None&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Represents a null value&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_nonlocal.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;nonlocal&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To declare a non-local variable&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_not.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;not&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;A logical operator&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_or.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;or&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;A logical operator&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_pass.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;pass&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;A null statement, a statement that will do nothing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_raise.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;raise&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To raise an exception&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_return.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;return&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To exit a function and return a value&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_true.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;True&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Boolean value, result of comparison operations&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_try.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;try&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To make a try...except statement&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_keyword_while.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;while&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To create a while loop&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font color=&quot;#2b00fe&quot;&gt;&lt;u style=&quot;background-color: white;&quot;&gt;with&lt;/u&gt;&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Used to simplify exception handling&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;u&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;yield&lt;/font&gt;&lt;/u&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;To end a function returns a generator&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/font&gt;&lt;/p&gt;&lt;h1 style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;font size=&quot;5&quot;&gt;Python Built-in Exceptions&lt;/font&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;:-&lt;/span&gt;&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;The table below shows built-in exceptions that are usually raised in Python:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 224px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Exception&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top; width: 792.8px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;ArithmeticError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when an error occurs in numeric calculations&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;AssertionError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when an assert statement fails&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;AttributeError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when attribute reference or assignment fails&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Exception&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Base class for all exceptions&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;EOFError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when the input() method hits an &quot;end of file&quot; condition (EOF)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;FloatingPointError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a floating point calculation fails&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;GeneratorExit&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a generator is closed (with the close() method)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;ImportError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when an imported module does not exist&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;IndentationError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when indendation is not correct&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;IndexError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when an index of a sequence does not exist&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;KeyError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a key does not exist in a dictionary&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;KeyboardInterrupt&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when the user presses Ctrl+c, Ctrl+z or Delete&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;LookupError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when errors raised cant be found&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;MemoryError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a program runs out of memory&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;NameError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a variable does not exist&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;NotImplementedError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when an abstract method requires an inherited class to override the&amp;nbsp;&lt;br /&gt;method&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;OSError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a system related operation causes an error&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;OverflowError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when the result of a numeric calculation is too large&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;ReferenceError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a weak reference object does not exist&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;RuntimeError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when an error occurs that do not belong to any specific expections&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;StopIteration&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when the next() method of an iterator has no further values&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;SyntaxError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a syntax error occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;TabError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when indentation consists of tabs or spaces&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;SystemError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a system error occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;SystemExit&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when the sys.exit() function is called&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;TypeError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when two different types are combined&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;UnboundLocalError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a local variable is referenced before assignment&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;UnicodeError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a unicode problem occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;UnicodeEncodeError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a unicode encoding problem occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;UnicodeDecodeError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a unicode decoding problem occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;UnicodeTranslateError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when a unicode translation problem occurs&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;ValueError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when there is a wrong value in a specified data type&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;ZeroDivisionError&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Raised when the second operator in a division is zero&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;h1 style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;font size=&quot;5&quot;&gt;Python Built-in Functions&lt;/font&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;:-&lt;/span&gt;&lt;/i&gt;&lt;/font&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: black; font-size: 15px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: white;&quot;&gt;Python has a set of built-in functions.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br style=&quot;color: #25265e;&quot; /&gt;&lt;/span&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 1017.6px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Function&lt;/span&gt;&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Description&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_abs.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;abs()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the absolute value of a number&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_all.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;all()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if all items in an iterable object are true&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_any.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;any()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if any item in an iterable object is true&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_ascii.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;ascii()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a readable version of an object. Replaces none-ascii characters with escape&amp;nbsp;&lt;br /&gt;character&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_bin.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;bin()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the binary version of a number&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_bool.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;bool()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the boolean value of the specified object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_bytearray.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;bytearray()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns an array of bytes&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_bytes.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;bytes()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a bytes object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_callable.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;callable()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if the specified object is callable, otherwise False&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_chr.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;chr()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a character from the specified Unicode code.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;u&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;classmethod()&lt;/font&gt;&lt;/u&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Converts a method into a class method&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_compile.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;compile()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the specified source as an object, ready to be executed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_complex.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;complex()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a complex number&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_delattr.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;delattr()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Deletes the specified attribute (property or method) from the specified object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_dict.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;dict()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a dictionary (Array)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_dir.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;dir()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a list of the specified object&#39;s properties and methods&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_divmod.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;divmod()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the quotient and the remainder when argument1 is divided by argument2&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_enumerate.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;enumerate()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Takes a collection (e.g. a tuple) and returns it as an enumerate object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_eval.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;eval()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Evaluates and executes an expression&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_exec.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;exec()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Executes the specified code (or object)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_filter.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;filter()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Use a filter function to exclude items in an iterable object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_float.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;float()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a floating point number&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_format.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;format()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Formats a specified value&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_frozenset.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;frozenset()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a frozenset object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_getattr.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;getattr()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the value of the specified attribute (property or method)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_globals.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;globals()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the current global symbol table as a dictionary&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_hasattr.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;hasattr()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if the specified object has the specified attribute (property/method)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;u&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;hash()&lt;/font&gt;&lt;/u&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the hash value of a specified object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;u&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;help()&lt;/font&gt;&lt;/u&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Executes the built-in help system&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_hex.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;hex()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Converts a number into a hexadecimal value&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_id.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;id()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the id of an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_input.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;input()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Allowing user input&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_int.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;int()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns an integer number&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_isinstance.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;isinstance()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if a specified object is an instance of a specified object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_issubclass.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;issubclass()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns True if a specified class is a subclass of a specified object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_iter.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;iter()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns an iterator object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_len.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;len()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the length of an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_list.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;list()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a list&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_locals.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;locals()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns an updated dictionary of the current local symbol table&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_map.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;map()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the specified iterator with the specified function applied to each item&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_max.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;max()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the largest item in an iterable&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_memoryview.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;memoryview()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a memory view object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_min.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;min()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the smallest item in an iterable&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_next.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;next()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the next item in an iterable&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_object.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;object()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a new object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_oct.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;oct()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Converts a number into an octal&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_open.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;open()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Opens a file and returns a file object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_ord.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;ord()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Convert an integer representing the Unicode of the specified character&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_pow.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;pow()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the value of x to the power of y&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_print.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;print()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Prints to the standard output device&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;u&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;property()&lt;/font&gt;&lt;/u&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Gets, sets, deletes a property&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_range.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;range()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a sequence of numbers, starting from 0 and increments by 1 (by default)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;u&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;repr()&lt;/font&gt;&lt;/u&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a readable version of an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_reversed.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;reversed()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a reversed iterator&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_round.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;round()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Rounds a numbers&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_set.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;set()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a new set object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_setattr.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;setattr()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Sets an attribute (property/method) of an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_slice.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;slice()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a slice object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_sorted.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;sorted()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a sorted list&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;font color=&quot;#2b00fe&quot; style=&quot;background-color: white;&quot;&gt;@staticmethod()&lt;/font&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Converts a method into a static method&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_str.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;str()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a string object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_sum.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;sum()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Sums the items of an iterator&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_super.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;super()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns an object that represents the parent class&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_tuple.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;tuple()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns a tuple&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_type.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;type()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the type of an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_vars.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;vars()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns the __dict__ property of an object&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #f1f1f1; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;a href=&quot;https://www.w3schools.com/python/ref_func_zip.asp&quot; style=&quot;background-color: white; box-sizing: inherit;&quot;&gt;zip()&lt;/a&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Returns an iterator, from two or more iterators&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/1791923220668401870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/keywords-built-in-exceptions-built-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1791923220668401870'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/1791923220668401870'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/keywords-built-in-exceptions-built-in.html' title='Keywords, Built-in Exceptions, Built-in Functions in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-7613798131251818408</id><published>2020-09-13T08:33:00.002+05:30</published><updated>2020-09-13T08:38:22.967+05:30</updated><title type='text'>Tuple Methods, Set Methods, File Methods in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;title-section pt-0x&quot; style=&quot;align-items: flex-end; background-color: white; box-sizing: border-box; color: #25265e; display: flex; margin: 0px; padding: 40px 0px 0px;&quot;&gt;&lt;div class=&quot;title-section__detail-container&quot; style=&quot;box-sizing: border-box; flex: 1 1 0%; margin: 0px; padding: 0px;&quot;&gt;&lt;h1 class=&quot;title-section__title&quot; style=&quot;box-sizing: border-box; line-height: 54px; margin: 0px 0px 20px; max-width: inherit; padding: 0px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python Tuple Methods:-&lt;/font&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;program-description mt-4x&quot; style=&quot;box-sizing: border-box; line-height: 24px; margin: 40px 0px 0px; padding: 0px;&quot;&gt;&lt;p class=&quot;mt-4x&quot; style=&quot;background-color: white; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; margin: 16px 0px 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;In Python, tuples are immutables. Meaning, you cannot change items of a tuple once it is assigned. There are only two tuple methods count() and index() that a tuple object can call.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/tuple/count&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Tuple count()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;returns count of the element in the tuple&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/tuple/index&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Tuple index()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;returns the index of the element in the tuple&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;title-section pt-0x&quot; style=&quot;align-items: flex-end; background-color: white; box-sizing: border-box; color: #25265e; display: flex; margin: 0px; padding: 40px 0px 0px;&quot;&gt;&lt;div class=&quot;title-section__detail-container&quot; style=&quot;box-sizing: border-box; flex: 1 1 0%; margin: 0px; padding: 0px;&quot;&gt;&lt;h1 class=&quot;title-section__title&quot; style=&quot;box-sizing: border-box; line-height: 54px; margin: 0px 0px 20px; max-width: inherit; padding: 0px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python Set Methods:-&lt;/font&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;program-description mt-4x&quot; style=&quot;box-sizing: border-box; line-height: 24px; margin: 40px 0px 0px; padding: 0px;&quot;&gt;&lt;p class=&quot;mt-4x&quot; style=&quot;background-color: white; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; margin: 16px 0px 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A set is an unordered collection of items. Set items are unique and immutable. In this reference page, you will find all the methods that a set object can use.&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/built-in/frozenset&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python frozenset()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;returns immutable frozenset object&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/add&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set add()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;adds an element to a set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/clear&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set clear()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;remove all elements from a set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/copy&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set copy()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Returns Shallow Copy of a Set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/difference&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set difference()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Returns Difference of Two Sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/difference_update&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set difference_update()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Updates Calling Set With Intersection of Sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/discard&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set discard()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Removes an Element from The Set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/intersection&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set intersection()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Returns Intersection of Two or More Sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/intersection_update&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set intersection_update()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Updates Calling Set With Intersection of Sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/isdisjoint&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set isdisjoint()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Checks Disjoint Sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/issubset&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set issubset()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Checks if a Set is Subset of Another Set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/issuperset&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set issuperset()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Checks if a Set is Superset of Another Set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/pop&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set pop()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Removes an Arbitrary Element&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/remove&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set remove()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;removes the specified element from the set&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/symmetric_difference&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set symmetric_difference()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Returns the symmetric difference of sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/symmetric_difference_update&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set symmetric_difference_update()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Updates the Set with symmetric difference&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/union&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set union()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Returns the union of sets&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;background-color: white; box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/set/update&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python Set update()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Add elements to the set&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;h1 style=&quot;box-sizing: border-box; font-size: 24px; line-height: 36px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i&gt;Python File Methods&lt;/i&gt;:-&lt;/font&gt;&lt;/h1&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;There are various methods available with the file object. Some of them have been used in the above examples.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Here is the complete list of methods in text mode with a brief description:&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;/font&gt;&lt;/p&gt;&lt;table border=&quot;0&quot; style=&quot;background-color: #f8faff; border-collapse: collapse; border: none; color: #25265e; font-family: euclid_circular_a, &amp;quot;source sans pro&amp;quot;, &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-size: 16px; margin: 0px; padding: 0px; white-space: pre-wrap; width: 788px;&quot;&gt;&lt;tbody style=&quot;border-top: 1px solid rgb(204, 204, 204); box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;th style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; font-weight: normal; margin: 0px; min-width: 100px; padding: 12px 24px; text-align: left;&quot;&gt;Method&lt;/th&gt;&lt;th style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; font-weight: normal; margin: 0px; min-width: 100px; padding: 12px 24px; text-align: left;&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;close()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Closes an opened file. It has no effect if the file is already closed.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;detach()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Separates the underlying binary buffer from the TextIOBase and returns it.
&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;fileno()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Returns an integer number (file descriptor) of the file.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;flush()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Flushes the write buffer of the file stream.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;isatty()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Returns True if the file stream is interactive.&lt;span style=&quot;font-family: droid sans mono, inconsolata, menlo, consolas, bitstream vera sans mono, courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: whitesmoke; font-size: 14px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;read(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;n&lt;/var&gt;)&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Reads at most &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;n&lt;/var&gt; characters from the file. Reads till the end of the file if it is negative or &lt;code style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;None&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;readable()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Returns True if the file stream can be read from.&lt;span style=&quot;font-family: droid sans mono, inconsolata, menlo, consolas, bitstream vera sans mono, courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: whitesmoke; font-size: 14px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;readline(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;n&lt;/var&gt;=-1)&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Reads and returns one line from the file. Reads in at most &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;n&lt;/var&gt; bytes if specified.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;readlines(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;n&lt;/var&gt;=-1)&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Reads and returns a list of lines from the file. Reads in at most &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;n&lt;/var&gt; bytes/characters if specified.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;seek(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;offset&lt;/var&gt;,&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;from&lt;/var&gt;=&lt;code style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;SEEK_SET&lt;/code&gt;)&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Changes the file position to &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;offset&lt;/var&gt; bytes, in reference to &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;from&lt;/var&gt; (start, current, end).&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;seekable()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Returns &lt;code style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;True&lt;/code&gt; if the file stream supports random access.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;tell()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Returns the current file location.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;truncate(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;size&lt;/var&gt;=&lt;code style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;None&lt;/code&gt;)&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Resizes the file stream to &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;size&lt;/var&gt; bytes. If &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;size&lt;/var&gt; is not specified, resizes to current location.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;writable()&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Returns &lt;code style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;True&lt;/code&gt; if the file stream can be written to.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;write(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;s&lt;/var&gt;)&lt;/td&gt;&lt;td style=&quot;border-bottom: 1px solid rgba(0, 0, 0, 0.1); box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Writes the string &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;s&lt;/var&gt; to the file and returns the number of characters written.&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom: 0px; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;writelines(&lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;lines&lt;/var&gt;)&lt;/td&gt;&lt;td style=&quot;border-bottom: 0px; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; min-width: 100px; padding: 12px 24px;&quot;&gt;Writes a list of &lt;var style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; font-style: normal; line-height: 20px; margin: 0px; padding: 0px 8px;&quot;&gt;lines&lt;/var&gt; to the file.

&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/7613798131251818408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/tuple-methods-set-methods-in-python-37.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/7613798131251818408'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/7613798131251818408'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/tuple-methods-set-methods-in-python-37.html' title='Tuple Methods, Set Methods, File Methods in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-9140358228535478177</id><published>2020-09-13T08:30:00.004+05:30</published><updated>2020-09-13T08:30:46.540+05:30</updated><title type='text'>String Methods in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;div class=&quot;title-section pt-0x&quot; style=&quot;align-items: flex-end; box-sizing: border-box; color: #25265e; display: flex; margin: 0px; padding: 40px 0px 0px;&quot;&gt;&lt;div class=&quot;title-section__detail-container&quot; style=&quot;box-sizing: border-box; flex: 1 1 0%; margin: 0px; padding: 0px;&quot;&gt;&lt;h1 class=&quot;title-section__title&quot; style=&quot;box-sizing: border-box; line-height: 54px; margin: 0px 0px 20px; max-width: inherit; padding: 0px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python String Methods:-&lt;/font&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;program-description mt-4x&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; line-height: 24px; margin: 40px 0px 0px; padding: 0px;&quot;&gt;&lt;p class=&quot;mt-4x&quot; style=&quot;box-sizing: border-box; margin: 16px 0px 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A string is a sequence of characters enclosed in quotation marks. In this reference page, you will find all the methods that a string object can call. For example, you can use the join() method to concatenate two strings.&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/capitalize&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String capitalize()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Converts first character to Capital Letter&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/casefold&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String casefold()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;converts to case folded strings&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/center&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String center()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Pads string with the specified character&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/count&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String count()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns occurrences of substring in string&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/encode&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String encode()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns encoded string of given string&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/endswith&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String endswith()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks if String Ends with the Specified Suffix&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/expandtabs&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String expandtabs()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Replaces Tab character With Spaces&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/find&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String find()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns the index of first occurrence of substring&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/format&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String format()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;formats string into the nicer output&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/format_map&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String format_map()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Formats the String Using Dictionary&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/index&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String index()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns Index of Substring&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isalnum&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isalnum()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks Alphanumeric Character&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isalpha&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isalpha()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks if All Characters are Alphabets&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isdecimal&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isdecimal()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks Decimal Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isdigit&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isdigit()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks Digit Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isidentifier&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isidentifier()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks for Valid Identifier&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/islower&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String islower()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks if all Alphabets in a String are Lowercase&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isnumeric&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isnumeric()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks Numeric Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isprintable&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isprintable()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks Printable Character&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isspace&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isspace()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks Whitespace Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/istitle&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String istitle()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks for Titlecased String&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/isupper&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String isupper()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns if all characters are uppercase characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/join&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String join()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns a Concatenated String&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/ljust&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String ljust()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns a left-justified string of given width&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/lower&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String lower()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns lowercased string&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/lstrip&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String lstrip()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Removes Leading Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/maketrans&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String maketrans()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns a translation table&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/partition&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String partition()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns a Tuple&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/replace&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String replace()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Replaces Substring Inside&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/rfind&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String rfind()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns the Highest Index of Substring&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/rindex&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String rindex()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns Highest Index of Substring&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/rjust&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String rjust()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns a right-justified string of given width&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/rpartition&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String rpartition()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns a Tuple&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/rsplit&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String rsplit()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Splits String From Right&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/rstrip&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String rstrip()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Removes Trailing Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/split&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String split()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Splits String from Left&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/splitlines&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String splitlines()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Splits String at Line Boundaries&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/startswith&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String startswith()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Checks if String Starts with the Specified String&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/strip&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String strip()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Removes Both Leading and Trailing Characters&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/swapcase&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String swapcase()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;swap uppercase characters to lowercase; vice versa&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/title&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String title()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns a Title Cased String&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/translate&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String translate()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns mapped charactered string&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/upper&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String upper()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns uppercased string&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/string/zfill&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python String zfill()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns a copy of The String Padded With Zeros&lt;/p&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/9140358228535478177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/string-methods-in-python-37.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/9140358228535478177'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/9140358228535478177'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/string-methods-in-python-37.html' title='String Methods in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-2559353924088971427</id><published>2020-09-13T08:29:00.001+05:30</published><updated>2020-09-13T08:29:13.914+05:30</updated><title type='text'>Dictionary Methods in Python 3.7</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h1 style=&quot;box-sizing: border-box; line-height: 54px; margin: 0px 0px 20px; max-width: inherit; padding: 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python Dictionary Methods:-&lt;/font&gt;&lt;/i&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;span color=&quot;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;A dictionary is a collection of key/value pairs. Python has various methods to work in dictionaries. In this reference page, you will find all the methods to work with dictionaries.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/clear&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary clear()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Removes all Items&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/copy&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary copy()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns Shallow Copy of a Dictionary&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/fromkeys&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary fromkeys()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;creates a dictionary from given sequence&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/get&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary get()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns Value of The Key&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/items&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary items()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns view of dictionary&#39;s (key, value) pair&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/keys&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary keys()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns View Object of All Keys&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/pop&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary pop()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;removes and returns element having given key&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/popitem&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary popitem()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Returns &amp;amp; Removes Latest Element From Dictionary&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/setdefault&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary setdefault()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Inserts Key With a Value if Key is not Present&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/update&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary update()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;Updates the Dictionary&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/dictionary/values&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;Python Dictionary values()&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;returns view of all values in the dictionary&lt;/p&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/2559353924088971427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/dictionary-methods-in-python-37.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/2559353924088971427'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/2559353924088971427'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/dictionary-methods-in-python-37.html' title='Dictionary Methods in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-8725761123112192738</id><published>2020-09-13T08:27:00.001+05:30</published><updated>2020-09-13T08:27:40.423+05:30</updated><title type='text'>List Comprehension vs For Loop in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;h2 style=&quot;background-color: #f9fafc; box-sizing: border-box; color: #25265e; line-height: 36px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;i&gt;List Comprehension vs For Loop in Python:-&lt;/i&gt;&lt;/font&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font&gt;&lt;span style=&quot;color: rgba(37, 38, 94, 0.701960784313725);&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: #f9fafc; font-size: 18px;&quot;&gt;Suppose, we want to separate the letters of the word&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgba(37, 38, 94, 0.701960784313725); font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: whitesmoke; font-size: 14px;&quot;&gt;human&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9fafc; color: rgba(37, 38, 94, 0.701960784313725); font-family: georgia; font-size: 18px;&quot;&gt;&amp;nbsp;and add the letters as items of a list. The first thing that comes in mind would be using&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f9fafc; color: #01ffff; font-family: georgia; font-size: 18px;&quot;&gt;for loop&lt;/span&gt;&lt;span style=&quot;background-color: #f9fafc; color: rgba(37, 38, 94, 0.701960784313725); font-family: georgia; font-size: 18px;&quot;&gt;.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: #f9fafc; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;h4 style=&quot;background-color: #f9fafc; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 28px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot;&gt;Example 1: Iterating through a string Using for Loop:-&lt;/font&gt;&lt;/i&gt;&lt;/h4&gt;&lt;div class=&quot;code-editor&quot; style=&quot;background-color: #f9fafc; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-family: euclid_circular_a, &amp;quot;source sans pro&amp;quot;, &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-size: 16px; margin: 0px 0px 32px; padding: 0px;&quot;&gt;&lt;div class=&quot;code-editor__area&quot; style=&quot;background-color: whitesmoke; box-sizing: border-box; margin: 0px; padding: 0px; width: 786px;&quot;&gt;&lt;pre class=&quot;python-exec&quot; style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-top: 0px; max-height: 600px; overflow: auto; padding: 16px;&quot;&gt;&lt;code class=&quot;python hljs&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 4px; border: none; box-sizing: border-box; color: #383a42; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; line-height: 20px; margin: 0px; overflow-x: auto; padding: 0px;&quot;&gt;h_letters = []

&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #a626a4; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; letter &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #a626a4; margin: 0px; padding: 0px;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #50a14f; margin: 0px; padding: 0px;&quot;&gt;&#39;human&#39;&lt;/span&gt;:
    h_letters.append(letter)

&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #a626a4; margin: 0px; padding: 0px;&quot;&gt;print&lt;/span&gt;(h_letters)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&lt;p style=&quot;background-color: #f9fafc; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;b&gt;&lt;i&gt;When we run the program, the output will be:&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 16px; margin-top: 0px; overflow: auto; padding: 16px;&quot;&gt;&lt;samp style=&quot;border-radius: 4px; border: none; box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; line-height: 20px; margin: 0px; padding: 0px;&quot;&gt;[&#39;h&#39;, &#39;u&#39;, &#39;m&#39;, &#39;a&#39;, &#39;n&#39;]&lt;/samp&gt;&lt;/pre&gt;&lt;p style=&quot;background-color: #f9fafc; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;However, Python has an easier way to solve this issue using List Comprehension. List comprehension is an elegant way to define and create lists based on existing lists.&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;background-color: #f9fafc; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Let’s see how the above program can be written using list comprehensions.&lt;/font&gt;&lt;/p&gt;&lt;hr style=&quot;background-color: #f9fafc; border-bottom-color: rgb(211, 220, 230); border-bottom-style: solid; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: content-box; color: #25265e; font-family: euclid_circular_a, &amp;quot;source sans pro&amp;quot;, &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-size: 16px; height: 0px; margin: 40px 0px; overflow: visible; padding: 0px;&quot; /&gt;&lt;h3 style=&quot;background-color: #f9fafc; box-sizing: border-box; color: #25265e; font-size: 20px; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot;&gt;Example 2: Iterating through a string Using List Comprehension:-&lt;/font&gt;&lt;/i&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: #f9fafc; box-sizing: border-box; color: #25265e; font-size: 20px; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;div class=&quot;code-editor&quot; style=&quot;border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; font-family: euclid_circular_a, &amp;quot;source sans pro&amp;quot;, &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-size: 16px; font-weight: 400; margin: 0px 0px 32px; padding: 0px;&quot;&gt;&lt;div class=&quot;code-editor__area&quot; style=&quot;background-color: whitesmoke; box-sizing: border-box; margin: 0px; padding: 0px; width: 786px;&quot;&gt;&lt;pre class=&quot;python-exec&quot; style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 0px; margin-top: 0px; max-height: 600px; overflow: auto; padding: 16px;&quot;&gt;&lt;code class=&quot;python hljs&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 4px; border: none; box-sizing: border-box; color: #383a42; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; line-height: 20px; margin: 0px; overflow-x: auto; padding: 0px;&quot;&gt;h_letters = [ letter &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #a626a4; margin: 0px; padding: 0px;&quot;&gt;for&lt;/span&gt; letter &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #a626a4; margin: 0px; padding: 0px;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-string&quot; style=&quot;box-sizing: border-box; color: #50a14f; margin: 0px; padding: 0px;&quot;&gt;&#39;human&#39;&lt;/span&gt; ]
&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box; color: #a626a4; margin: 0px; padding: 0px;&quot;&gt;print&lt;/span&gt;( h_letters)&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 18px; line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;i&gt;When we run the program, the output will be:-&lt;/i&gt;&lt;/font&gt;&lt;/p&gt;&lt;/h3&gt;&lt;pre style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; font-size: 14px; line-height: 20px; margin-bottom: 16px; margin-top: 0px; overflow: auto; padding: 16px;&quot;&gt;&lt;samp style=&quot;border-radius: 4px; border: none; box-sizing: border-box; display: inline-block; font-family: &amp;quot;droid sans mono&amp;quot;, inconsolata, menlo, consolas, &amp;quot;bitstream vera sans mono&amp;quot;, courier, monospace; line-height: 20px; margin: 0px; padding: 0px;&quot;&gt;[&#39;h&#39;, &#39;u&#39;, &#39;m&#39;, &#39;a&#39;, &#39;n&#39;]&lt;/samp&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 30px; margin: 0px 0px 16px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: #f9fafc; font-size: 18px;&quot;&gt;In the above example, a new list is assigned to variable&amp;nbsp;&lt;/font&gt;&lt;span style=&quot;background-color: whitesmoke; font-family: georgia; font-size: 14px;&quot;&gt;h_letters&lt;/span&gt;&lt;font face=&quot;georgia&quot; style=&quot;background-color: #f9fafc; font-size: 18px;&quot;&gt;, and the list contains the items of the iterable string &#39;human&#39;. We call the&amp;nbsp;&lt;/font&gt;&lt;font&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: whitesmoke; font-size: 14px;&quot;&gt;Print()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: #f9fafc; font-size: 18px;&quot;&gt;&amp;nbsp;function to receive the output.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;Python List Methods:-&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;font face=&quot;georgia&quot; size=&quot;5&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;span color=&quot;&quot; style=&quot;font-size: 16px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python has a lot of list methods that allow us to work with lists. In this reference page, you will find all the list methods to work with Python lists. For example, if you want to add a single item to the end of the list, you can use the list.append() method.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;span color=&quot;&quot; style=&quot;font-size: 16px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/append&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List append()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Add a single element to the end of the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/clear&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List clear()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Removes all items from the List&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/copy&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List copy()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;returns a shallow copy of the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/count&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List count()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;returns count of the element in the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/extend&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List extend()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;adds iterable elements to the end of the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/index&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List index()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;returns the index of the element in the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/insert&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List insert()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;insert an element to the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/pop&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List pop()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Removes the element at the given index&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/remove&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List remove()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Removes item from the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;border-bottom: 1px solid rgb(211, 220, 230); box-sizing: border-box; color: #25265e; font-size: 16px; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/reverse&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List reverse()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;reverses the list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;reference-data--row&quot; style=&quot;box-sizing: border-box; color: #25265e; margin: 0px; padding: 20px 0px;&quot;&gt;&lt;h3 class=&quot;reference-data__row__title&quot; style=&quot;box-sizing: border-box; font-size: 20px; font-weight: 500; line-height: 30px; margin: 0px 0px 12px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.programiz.com/python-programming/methods/list/sort&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgba(37, 38, 94, 0.7); margin: 0px; outline: none; padding: 0px; text-decoration-line: none; transition: all 0.2s ease 0s;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Python List sort()&lt;/font&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p class=&quot;reference-data__row__data&quot; style=&quot;box-sizing: border-box; color: rgba(37, 38, 94, 0.7); font-size: 16px; line-height: 24px; margin: 0px; padding: 0px;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;sorts elements of a list&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/8725761123112192738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/list-comprehension-vs-for-loop-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/8725761123112192738'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/8725761123112192738'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/list-comprehension-vs-for-loop-in-python.html' title='List Comprehension vs For Loop in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-6887106002563462421</id><published>2020-09-13T08:20:00.009+05:30</published><updated>2020-09-13T08:20:59.825+05:30</updated><title type='text'>Comment, Variable and Escape Sequence in Python 3.7</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;span&gt;&lt;b&gt;&lt;i&gt;&lt;font size=&quot;5&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Comment in Python&lt;/font&gt;&lt;font face=&quot;verdana&quot;&gt;:-&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;span face=&quot;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span&gt;A&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;comment has two types one is single-line comment and another is multi-line comment.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: georgia; font-size: 16px;&quot;&gt;The single-line comment is denoted by &quot;#&quot; sign and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: georgia; font-size: 16px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: georgia; font-size: 16px;&quot;&gt;multi-line&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: georgia; font-size: 16px;&quot;&gt;&amp;nbsp;comment is denoted by&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: georgia; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&#39;&#39;&#39; This is a comment &#39;&#39;&#39;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;font size=&quot;5&quot;&gt;Example:-&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #292d3e; color: #a6accd; font-family: consolas, &amp;quot;courier new&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #676e95; font-style: italic;&quot;&gt;#&amp;nbsp;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;single&amp;nbsp;line&amp;nbsp;comment&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;Follow&amp;nbsp;Coding&amp;nbsp;With&amp;nbsp;Mj....&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff; font-style: italic;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #676e95; font-style: italic;&quot;&gt;This&amp;nbsp;is&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #676e95; font-style: italic;&quot;&gt;a&amp;nbsp;Multiline&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #676e95; font-style: italic;&quot;&gt;Comment&lt;/span&gt;&lt;span style=&quot;color: #89ddff; font-style: italic;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span style=&quot;color: #222222; font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;font size=&quot;5&quot;&gt;Variable in python:-&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;color: #222222; font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; color: #222222; margin: 0px 0px 1.3rem;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;A Python variable is a reserved memory location to store values. In other words, a variable in a python program gives data to the computer for processing.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Every value in Python has a datatype. Different data types in Python are Numbers, List, Tuple, Strings, Dictionary, etc. Variables can be declared by any name or even alphabets like a, aa, abc, etc.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #222222; font-family: georgia;&quot;&gt;&lt;i&gt;&lt;font size=&quot;5&quot;&gt;Example:-&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #222222; font-family: georgia; font-size: 16px;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #292d3e; color: #a6accd; font-family: consolas, &amp;quot;courier new&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;Enter&amp;nbsp;the&amp;nbsp;first&amp;nbsp;number&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;var1&amp;nbsp;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #82aaff;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;()&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;Enter&amp;nbsp;the&amp;nbsp;second&amp;nbsp;number&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;var2&amp;nbsp;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #82aaff;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;Enter&amp;nbsp;the&amp;nbsp;third&amp;nbsp;number&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;var3&amp;nbsp;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #82aaff;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;Enter&amp;nbsp;the&amp;nbsp;fourth&amp;nbsp;number&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;var4&amp;nbsp;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #82aaff;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;()&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;The&amp;nbsp;sum&amp;nbsp;of&amp;nbsp;four&amp;nbsp;number&amp;nbsp;is&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffcb6b;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;var1&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffcb6b;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;var2&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffcb6b;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;var3&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffcb6b;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;var4&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;))&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #222222; font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;here var1, var2, var3, var4 is a example of variable.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;font size=&quot;5&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h1&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;font size=&quot;5&quot;&gt;Escape Sequence:-&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;To insert characters that are illegal in a string, use an escape character.&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;An escape character is a backslash&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;\&lt;/code&gt;&amp;nbsp;followed by the character you want to insert.&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;An example of an illegal character is a double quote inside a string that is surrounded by double quotes:&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;box-sizing: inherit; color: black; margin: 10px 0px;&quot;&gt;&lt;font size=&quot;5&quot;&gt;&lt;i&gt;Example:-&lt;/i&gt;&lt;/font&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;You will get an error if you use double quotes inside a string that is surrounded by double quotes:&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;txt =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot;We are the so-called &quot;&lt;/span&gt;&lt;span style=&quot;font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;Vikings&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot; from the north.&quot;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;To fix this problem, use the escape character&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: #f1f1f1; box-sizing: inherit; color: crimson; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;\&quot;&lt;/code&gt;:&lt;/p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;The escape character allows you to use double quotes when you normally would not be allowed:&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1em; margin-top: 1em;&quot;&gt;&lt;span style=&quot;font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;txt =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot;We are the so-called \&quot;&lt;/span&gt;&lt;span style=&quot;font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;Vikings\&lt;/span&gt;&lt;span class=&quot;pythonstringcolor&quot; style=&quot;box-sizing: inherit; color: brown; font-family: consolas, &amp;quot;courier new&amp;quot;;&quot;&gt;&quot; from the north.&quot;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 16px;&quot;&gt;&lt;p style=&quot;box-sizing: inherit; color: black; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Other escape characters used in Python:-&lt;/font&gt;&lt;/p&gt;&lt;table class=&quot;tabular table-fixed&quot; style=&quot;border-collapse: collapse; box-sizing: inherit; color: #41484d; font-family: &amp;quot;source sans pro&amp;quot;, &amp;quot;open sans&amp;quot;, &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-size: 18px; table-layout: fixed; width: 746.4px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;th style=&quot;background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: currentcolor; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Escape Sequence&lt;/span&gt;&lt;/i&gt;&lt;/th&gt;&lt;th style=&quot;background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: currentcolor; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Description&lt;/span&gt;&lt;/i&gt;&lt;/th&gt;&lt;th style=&quot;background: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: currentcolor; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Example&lt;/span&gt;&lt;/i&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\newline&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;Backslash and newline ignored&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 80px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 24px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;line1 \&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot; style=&quot;background-color: white; box-sizing: inherit; color: black;&quot;&gt;line2 \&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;line3&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;line1 lin&lt;/samp&gt;&lt;samp style=&quot;background-color: transparent; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;e2 line3&lt;/samp&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\\&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;Backslash (&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\&lt;/code&gt;)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 32px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 24px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;\\&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;\&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\&#39;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;Single quote (&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;&#39;&lt;/code&gt;)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 32px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 24px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&#39;\&#39;&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;&#39;&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\&quot;&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;Double quote (&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;&quot;&lt;/code&gt;)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 32px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 24px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;\&quot;&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;&quot;&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\a&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Bell (BEL)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 32px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: inherit; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: inherit; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: inherit; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 24px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;\a&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\b&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Backspace (BS)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 56px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.6px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;Hello \b World!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello   World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\f&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Formfeed (FF)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 56px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.6px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;Hello \f World!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;Hello 
 World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\n&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Linefeed (LF)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 56px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: inherit; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: inherit; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: inherit; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.5999px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;Hello \n World!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello 
 World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\r&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Carriage Return (CR)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 56px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.6px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;Hello \r World!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello 
 World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\t&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Horizontal Tab (TAB)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 56px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.5999px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;Hello \t World!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello      World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\v&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;ASCII Vertical Tab (VT)&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 56px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.6001px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;Hello \v World!&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello 
 World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\ooo&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;Character with octal value&amp;nbsp;&lt;var style=&quot;box-sizing: inherit;&quot;&gt;ooo&lt;/var&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 80px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.6px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;\110\145\154\154\157\40\127\157\162\154\144\41&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: inherit;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;code style=&quot;background-color: #f9f9f9; border-radius: 4px; box-sizing: inherit; color: black; font-family: monaco, consolas, monospace; font-size: 0.8em; padding: 2px 4px; text-shadow: rgb(255, 255, 255) 0px 1px;&quot;&gt;\xhh&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;Character with hex value&amp;nbsp;&lt;var style=&quot;box-sizing: inherit;&quot;&gt;hh&lt;/var&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(204, 204, 204); box-sizing: inherit; padding: 8px; vertical-align: text-top;&quot;&gt;&lt;div class=&quot;code-only&quot; style=&quot;box-sizing: inherit; margin-bottom: 1em;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-q-dark CodeMirror-wrap&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monospace; height: auto; line-height: 1.5; overflow: hidden; padding: 15px; position: relative;&quot;&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; left: 19px; overflow: hidden; position: relative; top: 19px; width: 3px;&quot;&gt;&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; style=&quot;bottom: -1em; box-sizing: inherit; font-family: inherit; font-size: inherit; height: 1em; line-height: inherit; outline: none; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: auto; margin-bottom: -30px; margin-right: -30px; outline: 0px; overflow: scroll; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 13px solid transparent; box-sizing: content-box; margin-bottom: -17px; margin-left: 0px; min-height: 80px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: inherit; cursor: text; min-height: 1px; padding: 4px 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; outline: none; position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;pre style=&quot;-webkit-tap-highlight-color: transparent; background: 0px 0px; border-radius: 0px; border-width: 0px; box-sizing: inherit; color: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: static; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 202.2px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;background-color: #2a2827; box-sizing: inherit; color: #f7f7f7; position: relative; visibility: hidden; z-index: 3;&quot;&gt;&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid rgb(255, 255, 255); border-right: none; box-sizing: inherit; height: 23.6001px; left: 4px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: inherit; outline: 0px;&quot;&gt;&lt;pre class=&quot;CodeMirror-line&quot; style=&quot;-webkit-tap-highlight-color: transparent; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border-width: 0px; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; font-variant-ligatures: none; height: auto; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: visible; padding: 0px 4px; position: relative; tab-size: 2; white-space: pre-wrap; word-break: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; color: black; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: inherit;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: inherit;&quot;&gt;&quot;\x48\x65\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class=&quot;output&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: monaco, consolas, monospace; font-size: 16px; height: auto; hyphens: none; line-height: 1.5; margin-top: 0px; overflow: auto; padding: 20px; tab-size: 2; white-space: pre-wrap;&quot;&gt;&lt;samp style=&quot;background-color: white; box-shadow: none; box-sizing: inherit; font-family: monaco, consolas, monospace; line-height: 1.5;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello World!&lt;/span&gt;&lt;/samp&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/6887106002563462421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/comment-variable-and-escape-sequence-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/6887106002563462421'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/6887106002563462421'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/09/comment-variable-and-escape-sequence-in.html' title='Comment, Variable and Escape Sequence in Python 3.7'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-7933279436714692155</id><published>2020-07-28T22:40:00.051+05:30</published><updated>2020-09-14T12:28:44.375+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming Language"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><title type='text'>Python 3.7 </title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Today we will start with python basics, python programming fundamentals, python for loop, python dictionary, python list, python class, python else if, python function, python tuple, python regular expression, python data types, python string, python range, python lambda, python split, python list comprehension, python operator, python lambda function, python read file, python comment, python sorted, python enumerate, python data structures, python try-catch, python global variables and then will touch upon some advanced level concepts in great detail.&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;After watching this course, you will be very successful in learning python.&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;This is a full python course. A python full course which covers each and every aspect of it. This Python tutorial for beginners which comes with no prerequisite whatsoever. I hope you will enjoy these.😊😊😊&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h1 style=&quot;background-color: white; box-sizing: inherit; margin: 10px 0px;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Python&amp;nbsp;&lt;span class=&quot;color_h1&quot; style=&quot;box-sizing: inherit;&quot;&gt;Introduction:-&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/h1&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What is Python?&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;It is used for:&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;web development (server-side),&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;software development,&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;mathematics,&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;system scripting.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;What can Python do?&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python can be used on a server to create web applications.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python can be used alongside software to create workflows.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python can connect to database systems. It can also read and modify files.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python can be used to handle big data and perform complex mathematics.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python can be used for rapid prototyping, or for production-ready software development.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;Why Python?&lt;/h3&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python has a simple syntax similar to the English language.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python has a syntax that allows developers to write programs with fewer lines than some other programming languages.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python can be treated in a procedural way, an object-orientated way, or a functional way.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;Good to know&lt;/h3&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;The most recent major version of Python is Python 3, which we shall be using in this tutorial. However, Python 2, although not being updated with anything other than security updates, is still quite popular.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;In this tutorial, Python will be written in a text editor. It is possible to write Python in an Integrated Development Environment, such as Thonny, Pycharm, Netbeans, or Eclipse which are particularly useful when managing larger collections of Python files.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;background-color: white; box-sizing: inherit; font-size: 24px; font-weight: 400; margin: 10px 0px;&quot;&gt;Python Syntax compared to other programming languages&lt;/h3&gt;&lt;ul style=&quot;background-color: white; box-sizing: inherit; font-size: 15px;&quot;&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python was designed for readability and has some similarities to the English language with influence from mathematics.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python uses new lines to complete a command, as opposed to other programming languages that often use semicolons or parentheses.&lt;/li&gt;&lt;li style=&quot;box-sizing: inherit;&quot;&gt;Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions, and classes. Other programming languages often use curly-brackets for this purpose.&lt;/li&gt;&lt;/ul&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;We started our Python program with a print&amp;nbsp;hello world.&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQI7V1sdnj_cUf1XnYVfFA8sDq_gWdCvQiVWXXWrXAd9E-Gca50K_LPLoz18-_O5PqgMsjkpYed_4WmWsFttxDUYxdXyQ7H0fWHcD8avr1AkdMTpjpdSIOFQsuIXQSnV_Z5Tyc0mxGeQkF/s1029/Screenshot+%252852%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1029&quot; data-original-width=&quot;957&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQI7V1sdnj_cUf1XnYVfFA8sDq_gWdCvQiVWXXWrXAd9E-Gca50K_LPLoz18-_O5PqgMsjkpYed_4WmWsFttxDUYxdXyQ7H0fWHcD8avr1AkdMTpjpdSIOFQsuIXQSnV_Z5Tyc0mxGeQkF/s320/Screenshot+%252852%2529.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;print()- is a function which&amp;nbsp;prints the text given between the double&amp;nbsp;quotation&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;source code------------&amp;gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;background-color: #292d3e; color: #a6accd; font-family: consolas, &amp;quot;courier new&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #82aaff;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;Hello&amp;nbsp;world&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/7933279436714692155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/07/python-tutorials.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/7933279436714692155'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/7933279436714692155'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/07/python-tutorials.html' title='Python 3.7 '/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQI7V1sdnj_cUf1XnYVfFA8sDq_gWdCvQiVWXXWrXAd9E-Gca50K_LPLoz18-_O5PqgMsjkpYed_4WmWsFttxDUYxdXyQ7H0fWHcD8avr1AkdMTpjpdSIOFQsuIXQSnV_Z5Tyc0mxGeQkF/s72-c/Screenshot+%252852%2529.png" height="72" width="72"/><thr:total>2</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1025235229134900490.post-675021429182416834</id><published>2020-07-21T22:33:00.004+05:30</published><updated>2020-09-13T08:08:43.906+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>My First Website</title><content type='html'>&lt;font face=&quot;times&quot;&gt;&lt;span style=&quot;background-color: #f8f9fa; color: #212529; font-size: 16px;&quot;&gt;Today, we will start our journey from our first website to&lt;/span&gt;&lt;span style=&quot;background-color: #f8f9fa; color: #212529; font-size: 16px;&quot;&gt;&amp;nbsp;a blogger. This is one of the most used python programming frameworks for creating website backends. Its been an amazing journey. Everything you will learn in these tutorials will be based on my experience in learning web design. This is The set of tutorials that will make you realize, how easy it is to make a website with a very basic knowledge of python and HTML.&lt;/span&gt;&lt;/font&gt;&lt;div&gt;&lt;font color=&quot;#212529&quot; face=&quot;times&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color=&quot;#212529&quot; face=&quot;times&quot;&gt;I am starting my first post with the heading of my website. I hope all of you support me&lt;/font&gt;&lt;font color=&quot;#212529&quot; face=&quot;&quot;&gt;😊😊😊&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font color=&quot;#212529&quot; face=&quot;&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIPx4HTXfTLHAD-mpVbdIlnEG2u7yubqkGICW-7Odw6ciBDUstkhV1hluJOV3aFj1RI8lXjAHJND7HG7ihRk01ePs501eMOB9kJKa8xnhASei12ZsIRLeiw-WZXn4cI0EfUYZP3unWO2F/s1920/Screenshot+%252843%2529.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;351&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIPx4HTXfTLHAD-mpVbdIlnEG2u7yubqkGICW-7Odw6ciBDUstkhV1hluJOV3aFj1RI8lXjAHJND7HG7ihRk01ePs501eMOB9kJKa8xnhASei12ZsIRLeiw-WZXn4cI0EfUYZP3unWO2F/w625-h351/Screenshot+%252843%2529.png&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;And source code in below...........&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div style=&quot;background-color: #292d3e; color: #a6accd; font-family: consolas, &amp;quot;courier new&amp;quot;, monospace; font-size: 15.4px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;DOCTYPE&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;lang&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;en&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;charset&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;UTF-8&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;viewport&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;width=device-width,&amp;nbsp;initial-scale=1.0&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;link&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;rel&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;stylesheet&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;Coding&amp;nbsp;With&amp;nbsp;Mj&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;text-gray-700&amp;nbsp;body-font&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;container&amp;nbsp;mx-auto&amp;nbsp;flex&amp;nbsp;flex-wrap&amp;nbsp;p-5&amp;nbsp;flex-col&amp;nbsp;md:flex-row&amp;nbsp;items-center&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;flex&amp;nbsp;title-font&amp;nbsp;font-medium&amp;nbsp;items-center&amp;nbsp;text-gray-900&amp;nbsp;mb-4&amp;nbsp;md:mb-0&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;svg&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;http://www.w3.org/2000/svg&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;fill&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;violet&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;currentColor&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke-linecap&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke-linejoin&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke-width&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;w-10&amp;nbsp;h-8&amp;nbsp;text-white&amp;nbsp;p-2&amp;nbsp;bg-indigo-500&amp;nbsp;rounded-full&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;viewBox&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;0&amp;nbsp;0&amp;nbsp;24&amp;nbsp;24&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;path&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;M12&amp;nbsp;2L2&amp;nbsp;7l10&amp;nbsp;5&amp;nbsp;10-5-10-5zM2&amp;nbsp;17l10&amp;nbsp;5&amp;nbsp;10-5M2&amp;nbsp;12l10&amp;nbsp;5&amp;nbsp;10-5&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;svg&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;ml-3&amp;nbsp;text-xl&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Coding&amp;nbsp;With&amp;nbsp;Mj&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;nav&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;md:mr-auto&amp;nbsp;md:ml-4&amp;nbsp;md:py-1&amp;nbsp;md:pl-4&amp;nbsp;md:border-l&amp;nbsp;md:border-gray-400&amp;nbsp;flex&amp;nbsp;flex-wrap&amp;nbsp;items-center&amp;nbsp;text-base&amp;nbsp;justify-center&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;mr-5&amp;nbsp;hover:text-gray-900&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Home&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;mr-5&amp;nbsp;hover:text-gray-900&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Images&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;mr-5&amp;nbsp;hover:text-gray-900&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Contact&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;mr-5&amp;nbsp;hover:text-gray-900&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;News&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;mr-5&amp;nbsp;hover:text-gray-900&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;About&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;nav&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;inline-flex&amp;nbsp;items-center&amp;nbsp;bg-gray-200&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;border-0&amp;nbsp;py-1&amp;nbsp;px-3&amp;nbsp;focus:outline-none&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;hover:bg-gray-300&amp;nbsp;rounded&amp;nbsp;text-base&amp;nbsp;mt-4&amp;nbsp;md:mt-0&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Search&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;svg&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;fill&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;currentColor&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke-linecap&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke-linejoin&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;stroke-width&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;w-4&amp;nbsp;h-4&amp;nbsp;ml-1&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;viewBox&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;0&amp;nbsp;0&amp;nbsp;24&amp;nbsp;24&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;path&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c792ea;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;M5&amp;nbsp;12h14M12&amp;nbsp;5l7&amp;nbsp;7-7&amp;nbsp;7&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;svg&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;text-gray-700&amp;nbsp;body-font&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;container&amp;nbsp;mx-auto&amp;nbsp;flex&amp;nbsp;px-5&amp;nbsp;py-24&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;md:flex-row&amp;nbsp;flex-col&amp;nbsp;items-center&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;lg:flex-grow&amp;nbsp;md:w-1/2&amp;nbsp;lg:pr-24&amp;nbsp;md:pr-16&amp;nbsp;flex&amp;nbsp;flex-col&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;md:items-start&amp;nbsp;md:text-left&amp;nbsp;mb-16&amp;nbsp;md:mb-0&amp;nbsp;items-center&amp;nbsp;text-center&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;title-font&amp;nbsp;sm:text-4xl&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;text-3xl&amp;nbsp;mb-4&amp;nbsp;font-medium&amp;nbsp;text-gray-900&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&amp;nbsp;Share&amp;nbsp;of&amp;nbsp;knowledge&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;br&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;hidden&amp;nbsp;lg:inline-block&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;h1&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;mb-8&amp;nbsp;leading-relaxed&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;flex&amp;nbsp;justify-center&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;inline-flex&amp;nbsp;text-white&amp;nbsp;bg-indigo-500&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;border-0&amp;nbsp;py-2&amp;nbsp;px-6&amp;nbsp;focus:outline-none&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;hover:bg-indigo-600&amp;nbsp;rounded&amp;nbsp;text-lg&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Next&amp;nbsp;Page&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;ml-4&amp;nbsp;inline-flex&amp;nbsp;text-gray-700&amp;nbsp;bg-gray-200&amp;nbsp;border-0&amp;nbsp;py-2&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;px-6&amp;nbsp;focus:outline-none&amp;nbsp;hover:bg-gray-300&amp;nbsp;rounded&amp;nbsp;text-lg&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;Previous&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;lg:max-w-lg&amp;nbsp;lg:w-full&amp;nbsp;md:w-1/2&amp;nbsp;w-5/6&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;img&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;object-cover&amp;nbsp;object-center&amp;nbsp;rounded&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;hero&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c792ea;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #c3e88d;&quot;&gt;https://source.unsplash.com/720x600/?books,knowledge&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #f07178;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #89ddff;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZy7E5klPxmqNqmthyphenhyphenNr_-JpOReC0weLTqemUUI7g8ys3X3hUWxgbF0t_vTbjWbF1b63UmDxrjLsbpJ0uQY5Y37H0C_0C3TBgg9Uqj9vqP4i464pzrUMxmHI3IrEKjj5rESaZhWiX08e2-/s1920/Screenshot+%252842%2529.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codingwithmj.blogspot.com/feeds/675021429182416834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codingwithmj.blogspot.com/2020/07/my-first-website.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/675021429182416834'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1025235229134900490/posts/default/675021429182416834'/><link rel='alternate' type='text/html' href='https://codingwithmj.blogspot.com/2020/07/my-first-website.html' title='My First Website'/><author><name>CodingwithMj</name><uri>http://www.blogger.com/profile/18237374532572796322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeYrgb6TAfeU5oYWRvphUnrColGxhttjjrzqEE007PDEPVANCUZI-awmFlHukOXEEhjPAFO-fWFoasnP6wEvnjv9WIDY9mLl1h-ySHjlrv4Un2gcJOpDRHmrTK8hx0YrE/s113/eb35bb3a4f04bfb22d266accab143c68.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIPx4HTXfTLHAD-mpVbdIlnEG2u7yubqkGICW-7Odw6ciBDUstkhV1hluJOV3aFj1RI8lXjAHJND7HG7ihRk01ePs501eMOB9kJKa8xnhASei12ZsIRLeiw-WZXn4cI0EfUYZP3unWO2F/s72-w625-h351-c/Screenshot+%252843%2529.png" height="72" width="72"/><thr:total>1</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></entry></feed>