<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhavatharani on Medium]]></title>
        <description><![CDATA[Stories by Bhavatharani on Medium]]></description>
        <link>https://medium.com/@vbhava862001?source=rss-d0bf81a8ef51------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*A-bmz1KFc-5Fmr1B</url>
            <title>Stories by Bhavatharani on Medium</title>
            <link>https://medium.com/@vbhava862001?source=rss-d0bf81a8ef51------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:30:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vbhava862001/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[COLLECTIONS IN PYTHON]]></title>
            <link>https://medium.com/@vbhava862001/collections-in-python-8ea4b658eec4?source=rss-d0bf81a8ef51------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ea4b658eec4</guid>
            <dc:creator><![CDATA[Bhavatharani]]></dc:creator>
            <pubDate>Sat, 21 May 2022 05:14:12 GMT</pubDate>
            <atom:updated>2022-05-21T05:14:12.592Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*TCe6J9f0LrDHeXxh.png" /></figure><p>Collections in python are basically container data types, namely lists, sets, tuples, dictionary. They have different characteristics based on the declaration and the usage.</p><ul><li>A list is declared in square brackets, it is mutable, stores duplicate values and elements can be accessed using indexes.</li><li>A tuple is ordered and immutable in nature, although duplicate entries can be there inside a tuple.</li><li>A set is unordered and declared in square brackets. It is not indexed and does not have duplicate entries as well.</li><li>A dictionary has key value pairs and is mutable in nature. We use square brackets to declare a dictionary.</li></ul><p>These are the python’s general purpose built-in container data types. But as we all know, python always has a little something extra to offer. It comes with a python module named collections which has specialized data structures.</p><h3>Specialized Collection Data Structures</h3><p>Collections module in python implements specialized data structures which provide alternative to python’s built-in container data types. Following are the specialized data structures in collections module.</p><ol><li>namedtuple( )</li><li>deque</li><li>Chainmap</li><li>Counter</li><li>OrderedDict</li><li>defaultdict</li><li>UserDict</li><li>UserList</li><li>UserString</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/311/0*LihxuesLpMt1dVxB" /></figure><h3>namedtuple( )</h3><p>It returns a tuple with a named entry, which means there will be a name assigned to each value in the tuple. It overcomes the problem of accessing the elements using the index values. With namedtuple( ) it becomes easier to access these values, since you do not have to remember the index values to get specific elements.</p><p><strong>Syntax:</strong></p><pre>class collections.namedtuple(typename, field_names)</pre><h3>deque</h3><p>deque pronounced as ‘deck’ is an optimized list to perform insertion and deletion easily.is the optimized list for quicker append and pop operations from both sides of the container. It provides O(1) time complexity for append and pop operations as compared to list with O(n) time complexity.</p><p><strong>Syntax:</strong></p><pre>class collections.deque(list)</pre><h3>ChainMap</h3><p>It is a dictionary like class which is able to make a single view of multiple mappings. It basically returns a list of several other dictionaries. Suppose you have two dictionaries with several key value pairs, in this case ChainMap will make a single list with both the dictionaries in it.</p><p><strong>Syntax:</strong></p><pre>class collections.ChainMap(dict1, dict2)</pre><h3>Counters</h3><p>A counter is a sub-class of the dictionary. It is used to keep the count of the elements in an iterable in the form of an unordered dictionary where the key represents the element in the iterable and value represents the count of that element in the iterable.</p><p><strong>Note: </strong>It is equivalent to bag or multiset of other languages.</p><p><strong>Syntax:</strong></p><pre>class collections.Counter([iterable-or-mapping])</pre><h3>OrderedDict</h3><p>An OrderedDict is also a sub-class of dictionary but unlike dictionary, it remembers the order in which the keys were inserted.</p><p><strong>Syntax:</strong></p><pre>class collections.OrderDict()</pre><h3>DefaultDict</h3><p>A <a href="https://www.geeksforgeeks.org/defaultdict-in-python/">DefaultDict</a> is also a sub-class to dictionary. It is used to provide some default values for the key that does not exist and never raises a KeyError.</p><p><strong>Syntax:</strong></p><pre>class collections.defaultdict(default_factory)</pre><p>default_factory is a function that provides the default value for the dictionary created. If this parameter is absent then the KeyError is raised.</p><h4>Initializing DefaultDict Objects</h4><p>DefaultDict objects can be initialized using DefaultDict() method by passing the data type as an argument.</p><h3>UserDict</h3><p>UserDict is a dictionary-like container that acts as a wrapper around the dictionary objects. This container is used when someone wants to create their own dictionary with some modified or new functionality.</p><p><strong>Syntax:</strong></p><pre>class collections.UserDict([initiaa])</pre><h3>UserList</h3><p>UserList is a list like container that acts as a wrapper around the list objects. This is useful when someone wants to create their own list with some modified or additional functionality.</p><p><strong>Syntax:</strong></p><pre>class collections.UserList([list])</pre><h3>UserString</h3><p>UserString is a string like container and just like UserDict and UserList it acts as a wrapper around string objects. It is used when someone wants to create their own strings with some modified or additional functionality.</p><p><strong>Syntax:</strong></p><pre>class collections.UserString(seq)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ea4b658eec4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DECORATORS IN PYTHON]]></title>
            <link>https://medium.com/@vbhava862001/decorators-in-python-e21a4591fcd7?source=rss-d0bf81a8ef51------2</link>
            <guid isPermaLink="false">https://medium.com/p/e21a4591fcd7</guid>
            <dc:creator><![CDATA[Bhavatharani]]></dc:creator>
            <pubDate>Thu, 19 May 2022 15:38:47 GMT</pubDate>
            <atom:updated>2022-05-19T15:38:47.651Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ShLFFagutZwiz9QD.jpeg" /></figure><p>Python has an interesting feature called <strong>decorators</strong> to add functionality to an existing code.</p><p>This is also called <strong>metaprogramming</strong> because a part of the program tries to modify another part of the program at compile time.</p><p>There are three rules of functions:</p><ol><li>Reference of a function to another function</li><li>A function name can be passed as an argument</li><li>A function can return another function</li></ol><p><strong>Syntax for Decorator:</strong></p><pre>@gfg_decorator<br>def hello_decorator():<br>    print(&quot;Gfg&quot;)</pre><pre>&#39;&#39;&#39;Above code is equivalent to -</pre><pre>def hello_decorator():<br>    print(&quot;Gfg&quot;)<br>    <br>hello_decorator = gfg_decorator(hello_decorator)&#39;&#39;&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e21a4591fcd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DATATYPES IN PYTHON]]></title>
            <link>https://medium.com/@vbhava862001/datatypes-in-python-f99b56a4d223?source=rss-d0bf81a8ef51------2</link>
            <guid isPermaLink="false">https://medium.com/p/f99b56a4d223</guid>
            <dc:creator><![CDATA[Bhavatharani]]></dc:creator>
            <pubDate>Thu, 19 May 2022 15:26:51 GMT</pubDate>
            <atom:updated>2022-05-19T15:28:53.289Z</atom:updated>
            <content:encoded><![CDATA[<p>Data types are the classification or categorization of data items. It represents the kind of value that tells what operations can be performed on a particular data. Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes.</p><p>Following are the standard or built-in data type of Python:</p><ul><li>Numeric</li><li>Sequence Type</li><li>List</li><li>Tuple</li><li>Set</li><li>Dictionary</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/0*--l7zO2YLkPXnyWY.png" /></figure><h3>Numeric:</h3><p>In Python, numeric data type represent the data which has numeric value. Numeric value can be integer, floating number or even complex numbers. These values are defined as int, float and complex class in Python.</p><ul><li><strong>Integers </strong>— This value is represented by int class. It contains positive or negative whole numbers (without fraction or decimal). In Python there is no limit to how long an integer value can be.</li><li><strong>Float </strong>— This value is represented by float class. It is a real number with floating point representation. It is specified by a decimal point. Optionally, the character e or E followed by a positive or negative integer may be appended to specify scientific notation.</li><li><strong>Complex Numbers</strong> — Complex number is represented by complex class. It is specified as <em>(real part) + (imaginary part)j</em>. For example — 2+3j</li></ul><h3>String:</h3><p>A sequence of Unicode characters makes up the string. A string is a group of one or more characters enclosed in a quotation mark, double-quote, or triple-quote. An str class can be used to represent it. Different types of operations can be performed like concatenation which is the adding of two or more strings together, slicing which is the technique of extracting different parts from a string and repetition which is a set of instructions repeated a set number of times.</p><h3>List:</h3><p>All the elements of a list are enclosed in square brackets [ ] and separated by commas.<br>It can include any number of elements, which may or may not be of various sorts (integer, float, string, etc.).<br>A list can be changed.</p><h3>Tuple:</h3><p>An ordered collection of Python objects is known as a tuple. The only difference between a tuple and a list is that tuples are immutable, meaning they can’t be changed after they’ve been generated. The tuple class is used to represent it. Parentheses can be used to express tuples ( ).</p><h3>Set:</h3><p>A set is an unsorted group of elements. Each set element must be unique (no duplication) and immutable. Because the set is an unordered collection, indexing is futile.</p><h3>Dictionary:</h3><p>In Python, a Dictionary is an unordered collection of data values, similar to a map, that is used to store data values. Unlike other Data Types that carry only a single value as an element, a Dictionary contains key-value pairs. To make the dictionary more optimized, key-value pairs are provided. Each key-value pair is separated by a colon in the representation of a dictionary data type, whereas each key is separated by a ‘comma’.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f99b56a4d223" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OOPS CONCEPT IN PYTHON]]></title>
            <link>https://medium.com/@vbhava862001/oops-concept-in-python-c6ee563d7ea5?source=rss-d0bf81a8ef51------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6ee563d7ea5</guid>
            <dc:creator><![CDATA[Bhavatharani]]></dc:creator>
            <pubDate>Thu, 19 May 2022 15:15:06 GMT</pubDate>
            <atom:updated>2022-05-19T15:15:06.960Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is a multi-paradigm programming language. It supports different programming approaches.</p><p>One of the popular approaches to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP).</p><p>An object has two characteristics:</p><ul><li>attributes</li><li>behavior</li></ul><p>Let’s take an example:</p><p>A parrot is an object, as it has the following properties:</p><ul><li>name, age, color as attributes</li><li>singing, dancing as behavior</li></ul><p>The concept of OOP in Python focuses on creating reusable code. This concept is also known as DRY (Don’t Repeat Yourself).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DBizyXBl2Xc8CE0c.png" /></figure><p>The main concepts of OOPs are:</p><ol><li>Class</li><li>Objects</li><li>Polymorphism</li><li>Encapsulation</li><li>Inheritance</li></ol><h3>Class:</h3><p>A class is a blueprint for the object.</p><p>We can think of class as a sketch of a parrot with labels. It contains all the details about the name, colors, size etc. Based on these descriptions, we can study about the parrot. Here, a parrot is an object.</p><h3>Object:</h3><p>An object (instance) is an instantiation of a class. When class is defined, only the description for the object is defined. Therefore, no memory or storage is allocated.</p><h3>Inheritance:</h3><p>Inheritance is a way of creating a new class for using details of an existing class without modifying it. The newly formed class is a derived class (or child class). Similarly, the existing class is a base class (or parent class).</p><h3>Encapsulation</h3><p>Using OOP in Python, we can restrict access to methods and variables. This prevents data from direct modification which is called encapsulation. In Python, we denote private attributes using underscore as the prefix i.e single -_or double __.</p><h3>Polymorphism</h3><p>Polymorphism is an ability (in OOP) to use a common interface for multiple forms (data types).</p><p>Suppose, we need to color a shape, there are multiple shape options (rectangle, square, circle). However we could use the same method to color any shape. This concept is called Polymorphism.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6ee563d7ea5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LOOP CONTROL STATEMENT IN PYTHON]]></title>
            <link>https://medium.com/@vbhava862001/loop-control-statement-in-python-8c9d671afdb2?source=rss-d0bf81a8ef51------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c9d671afdb2</guid>
            <dc:creator><![CDATA[Bhavatharani]]></dc:creator>
            <pubDate>Thu, 19 May 2022 15:08:06 GMT</pubDate>
            <atom:updated>2022-05-19T15:08:06.974Z</atom:updated>
            <content:encoded><![CDATA[<p>In Python, we have loop control statements that can be used to alter or control the flow of loop execution based on specified conditions. Python loop statements gives you a way execute the block of code repeatedly. But sometimes, you may want to exit a loop completely or skip specific part of a loop when it meets a specified condition. It can be done using loop control mechanism.</p><p>In Python we have following three types of loop control statements :</p><ul><li>Break Statement</li><li>Continue Statement</li><li>Pass Statement</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/0*iAnT43L9aTB0YSGB.jpg" /></figure><p><strong>Break statement:</strong></p><p>Based on the given condition, the break statement stops the execution and brings the control out of the loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*EyXdvFD-Cxt2K8Pg.jpg" /></figure><p><strong>Example:</strong></p><p>for val in “string”:<br> if val == “i”:<br> break<br> print(val)</p><p><strong>Output</strong></p><pre>s<br>t<br>r<br>The end</pre><h3>Continue statement</h3><p>The continue statement is used to skip the rest of the code inside a loop for the current iteration only. Loop does not terminate but continues on with the next iteration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*aO7juQg-gK85lLPn.jpg" /></figure><p><strong>Example:</strong></p><p>for val in “string”:<br> if val == “i”:<br> continue<br> print(val)</p><p><strong>Output:</strong></p><pre>s<br>t<br>r<br>n<br>g</pre><p><strong>Pass:</strong></p><p>In Python programming, the pass statement is a null statement. The difference between a <a href="https://www.programiz.com/python-programming/statement-indentation-comments">comment</a> and a pass statement in Python is that while the interpreter ignores a comment entirely, pass is not ignored.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c9d671afdb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[APPLICATIONS OF PYTHON]]></title>
            <link>https://medium.com/@vbhava862001/applications-of-python-5934c6628ad?source=rss-d0bf81a8ef51------2</link>
            <guid isPermaLink="false">https://medium.com/p/5934c6628ad</guid>
            <dc:creator><![CDATA[Bhavatharani]]></dc:creator>
            <pubDate>Thu, 19 May 2022 10:56:31 GMT</pubDate>
            <atom:updated>2022-05-19T10:56:31.528Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KPNc09euMSFTwCvWOU0_w.png" /></figure><p>Python is a high-level, interpreted, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically-typed and garbage-collected.</p><p>Further, it provides ease in building a plethora of applications, web development processes, and a lot more. In this blog, we will discuss the top 10 Python applications in the real world in a detailed manner. So let’s get started:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*EBHKtYRYnnC8OB1JqUD18w.png" /></figure><h3>1. Web Development</h3><p>It is one of the most astonishing applications of Python. This is because Python comes up with a wide range of frameworks like Django, Flask, Bottle, and a lot more that provide ease to developers. Furthermore, Python has inbuilt libraries and tools which make the web development process completely effortless. Use of Python for web development also offers:</p><ul><li><em>Amazing visualization</em></li><li><em>Convenience in development</em></li><li><em>Enhanced security</em></li><li><em>Fast development process</em></li></ul><h3>2. Machine Learning and Artificial Intelligence</h3><p>Machine Learning and Artificial Intelligence are the hottest subjects right now. Python along with its inbuilt libraries and tools facilitate the development of AI and ML algorithms. Further, it offers simple, concise, and readable code which makes it easier for developers to write complex algorithms and provide a versatile flow. Some of the inbuilt libraries and tools that enhance AI and ML processes are:</p><ul><li><em>Numpy</em></li><li><em>Keras</em></li><li><em>SciPy</em></li><li><em>Seaborn</em></li></ul><h3>3. Data Science</h3><p>Data science involves data collection, data sorting, data analysis, and data visualization. Python provides amazing functionality to tackle statistics and complex mathematical calculations. The presence of in-built libraries provides convenience to data science professionals. Some of the popular libraries that provide ease in the data science process are TensorFlow, Pandas, and Socket learning. These libraries provide an ecosystem for fine-tuning data models, data preprocessing, and performing complex data analysis.</p><h3>4. Game Development</h3><p>With the rapidly growing gaming industry <a href="https://www.geeksforgeeks.org/python-programming-language/">Python</a> has proved to be an exceptional option for game development. Popular games like Pirates of the Caribbean, Bridge commander, and Battlefield 2 use Python programming for a wide range of functionalities and addons. The presence of popular 2D and 3D gaming libraries like pygame, panda3D, and Cocos2D make the game development process completely effortless.</p><h3>5. Audio and Visual Applications</h3><p>Audio and video applications are undoubtedly the most amazing feature of Python. Python is equipped with a lot of tools and libraries to accomplish your task flawlessly. Applications that are coded in Python include popular ones like Netflix, Spotify, and YouTube. This can be handled by libraries like</p><ul><li><em>Dejavu</em></li><li><em>Pyo</em></li><li><em>Mingus</em></li><li><em>SciPy</em></li><li><em>OpenCV</em></li></ul><h3>6. Software Development</h3><p>Python is just the perfect option for software development. Popular applications like Google, Netflix, and Reddit all use Python. This language offers amazing features like:</p><ul><li><em>Platform independence</em></li><li><em>Inbuilt libraries and frameworks to provide ease of development.</em></li><li><em>Enhanced code reusability and readability</em></li><li><em>High compatibility</em></li></ul><p>Apart from these Python offers enhanced features to work with rapidly growing technologies like Machine learning and Artificial intelligence. All these embedded features make it a popular choice for software development.</p><h3>7. CAD Applications</h3><p>CAD refers to computer-aided design; it is the process of creating 3D and 2D models digitally. This application has replaced manual drift and is used by architects, product designers, and construction managers to design products with extremely high consistency. Python is embedded with amazing applications like Blender, FreeCAD, open cascade, and a lot more to efficiently design products. These provide enhanced features like technical drawing, dynamic system development, recordings, file export, and import.</p><h3>8. Business Applications</h3><p>Python offers excellent security and scalability features that make it perfect for delivering high-performance business applications. It has inbuilt libraries and tools like:</p><ul><li><em>Odoo</em></li><li><em>Tryton</em></li></ul><h3>9. Desktop GUI</h3><p>Python is an interactive programming language that helps developers to create GUIs easily and efficiently. It has a huge list of inbuilt tools like PyQT, kivy, wxWidgets, and many other libraries like them to build a fully functional GUI in an extremely secure and efficient manner.</p><h3>10. Web Scraping Application</h3><p>Web scraping is an automated process used to extract information from websites in an easier and faster way. The information is used by researchers, organizations, and analysts for a wide variety of tasks. Python has a wide range of features that make it suitable for web scraping</p><p><strong>Some other real-world applications of Python are:</strong></p><ul><li><em>Robotics and automation</em></li><li><em>Image processing:</em></li><li><em>Scientific applications</em></li></ul><p><strong>Conclusion: </strong>Python is a concise and extremely powerful language that is rapidly gaining popularity. It has been the epicenter of most amazing technologies like AI, automation, and machine learning. Further, it is used to facilitate hot subjects like data analysis and data visualization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5934c6628ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>