{"id":257,"date":"2025-01-25T12:11:16","date_gmt":"2025-01-25T06:26:16","guid":{"rendered":"https:\/\/pokharelsugam.com.np\/bioinformatics\/?p=257"},"modified":"2025-12-19T21:29:42","modified_gmt":"2025-12-19T15:44:42","slug":"introduction-python-programming-language","status":"publish","type":"post","link":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/","title":{"rendered":"Introduction to Python Programming Language"},"content":{"rendered":"\n<p>Python is a high-level, interpreted, and dynamically typed programming language. It was created by Guido van Rossum and first released in 1991. Python emphasizes code readability and simplicity, making it an excellent choice for beginners and experienced developers alike.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Features of Python<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Simple and Easy to Learn:<\/strong> Python has a clear and easy-to-understand syntax.<\/li>\n\n\n\n<li><strong>Interpreted Language:<\/strong> Python code is executed line by line, which makes debugging easier.<\/li>\n\n\n\n<li><strong>Dynamically Typed:<\/strong> No need to declare data types explicitly; the interpreter assigns types automatically.<\/li>\n\n\n\n<li><strong>Platform Independent:<\/strong> Python code can run on different platforms like Windows, macOS, and Linux without modification.<\/li>\n\n\n\n<li><strong>Extensive Libraries:<\/strong> Python has a rich set of libraries and frameworks, such as NumPy, Pandas, and TensorFlow, for various applications.<\/li>\n\n\n\n<li><strong>Object-Oriented:<\/strong> Python supports object-oriented programming concepts like classes and inheritance.<\/li>\n\n\n\n<li><strong>Open Source:<\/strong> Python is free to use and distribute.<\/li>\n\n\n\n<li><strong>Scalable:<\/strong> Python is suitable for both small and large-scale projects.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Uses of Python<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Web Development:<\/strong> Frameworks like Django and Flask.<\/li>\n\n\n\n<li><strong>Data Science:<\/strong> Libraries like Pandas, NumPy, and Matplotlib.<\/li>\n\n\n\n<li><strong>Artificial Intelligence and Machine Learning:<\/strong> Tools like TensorFlow and Scikit-learn.<\/li>\n\n\n\n<li><strong>Automation and Scripting:<\/strong> Automating repetitive tasks.<\/li>\n\n\n\n<li><strong>Game Development:<\/strong> Libraries like Pygame.<\/li>\n\n\n\n<li><strong>Desktop Applications:<\/strong> GUI development using Tkinter or PyQt.<\/li>\n\n\n\n<li><strong>Networking:<\/strong> Building network tools and servers.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Comments in Python<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use hashtag # in front of the comment for single line comment but there is no multiline comment in python.<\/li>\n\n\n\n<li>You can use triple single quote &#8216; &#8216; &#8216; for multiline comment like &#8216; &#8216; &#8216; Comment &#8216; &#8216; &#8216; but it also act as data.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Using Python Compilers <\/h2>\n\n\n\n<p><strong>Using Browser<\/strong><\/p>\n\n\n\n<p>Use online OnlineGDB &#8220;<a href=\"https:\/\/www.onlinegdb.com\/\">https:\/\/www.onlinegdb.com\/<\/a>&#8221; or any other compiler and Python as language<\/p>\n\n\n\n<p><strong>Installing Application<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download and install through the Official Python3 Website: &#8220;<a href=\"https:\/\/www.python.org\/downloads\/\">https:\/\/www.python.org\/downloads\/<\/a>&#8220;<\/li>\n\n\n\n<li>For Windows after installing Check Python Path is in Environment Variables :System: Path where address of python is located or not in. If not add the path.  If you don&#8217;t have any idea  please search in google or YouTube or ChatGPT.<\/li>\n\n\n\n<li>Use Visual Studio Code or any text editor to write and compile the python file whose extension is <code>.py<\/code> .<\/li>\n\n\n\n<li>You can also use <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">Jupyter Notebook<\/mark> for easy compiling and data analysis.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Basic Syntax in Python<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># This is a simple Python program\nprint(\"Hello World!\") #Printing string Hello World!\nprint(5) #Printing number 5<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Input Output<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>a = int(input(\"Enter any number: \")) # Input number a as integer\nprint(a) #Output produce any value you have entered<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Data Types in Python<\/h2>\n\n\n\n<p>The following table provides details about Python&#8217;s standard data types, examples, and memory usage:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Data Type<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><th><strong>Memory Usage<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>int<\/code><\/td><td>Integer values<\/td><td><code>10<\/code>, <code>-5<\/code><\/td><td>Depends on value (unbounded)<\/td><\/tr><tr><td><code>float<\/code><\/td><td>Floating-point numbers<\/td><td><code>3.14<\/code>, <code>-0.01<\/code><\/td><td>24 bytes (approx.)<\/td><\/tr><tr><td><code>complex<\/code><\/td><td>Complex numbers<\/td><td><code>3+4j<\/code>, <code>-5+2j<\/code><\/td><td>32 bytes (approx.)<\/td><\/tr><tr><td><code>str<\/code><\/td><td>Strings<\/td><td><code>'Hello'<\/code>, <code>\"Python\"<\/code><\/td><td>49 bytes + length of string<\/td><\/tr><tr><td><code>list<\/code><\/td><td>Ordered, mutable collections<\/td><td><code>[1, 2, 3]<\/code><\/td><td>64 bytes + elements&#8217; size<\/td><\/tr><tr><td><code>tuple<\/code><\/td><td>Ordered, immutable collections<\/td><td><code>(1, 2, 3)<\/code><\/td><td>48 bytes + elements&#8217; size<\/td><\/tr><tr><td><code>set<\/code><\/td><td>Unordered unique collections<\/td><td><code>{1, 2, 3}<\/code><\/td><td>224 bytes + elements&#8217; size<\/td><\/tr><tr><td><code>frozenset<\/code><\/td><td>Immutable sets<\/td><td><code>frozenset([1, 2])<\/code><\/td><td>Similar to <code>set<\/code><\/td><\/tr><tr><td><code>dict<\/code><\/td><td>Key-value pairs<\/td><td><code>{\"key\": \"value\"}<\/code><\/td><td>240 bytes + keys\/values&#8217; size<\/td><\/tr><tr><td><code>bool<\/code><\/td><td>Boolean values<\/td><td><code>True<\/code>, <code>False<\/code><\/td><td>28 bytes<\/td><\/tr><tr><td><code>bytes<\/code><\/td><td>Immutable byte sequences<\/td><td><code>b\"data\"<\/code><\/td><td>33 bytes + data length<\/td><\/tr><tr><td><code>bytearray<\/code><\/td><td>Mutable byte sequences<\/td><td><code>bytearray(4)<\/code><\/td><td>Similar to <code>bytes<\/code><\/td><\/tr><tr><td><code>memoryview<\/code><\/td><td>Memory view of bytes<\/td><td><code>memoryview(b\"abc\")<\/code><\/td><td>Depends on the source object<\/td><\/tr><tr><td><code>None<\/code><\/td><td>Represents no value<\/td><td><code>None<\/code><\/td><td>16 bytes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Operators in Python<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Category<\/strong><\/th><th><strong>Operator<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Arithmetic<\/strong><\/td><td><code>+<\/code><\/td><td>Addition<\/td><td><code>3 + 2<\/code> \u2192 <code>5<\/code><\/td><\/tr><tr><td><\/td><td><code>-<\/code><\/td><td>Subtraction<\/td><td><code>3 - 2<\/code> \u2192 <code>1<\/code><\/td><\/tr><tr><td><\/td><td><code>*<\/code><\/td><td>Multiplication<\/td><td><code>3 * 2<\/code> \u2192 <code>6<\/code><\/td><\/tr><tr><td><\/td><td><code>\/<\/code><\/td><td>Division (float result)<\/td><td><code>3 \/ 2<\/code> \u2192 <code>1.5<\/code><\/td><\/tr><tr><td><\/td><td><code>\/\/<\/code><\/td><td>Floor division (integer result)<\/td><td><code>3 \/\/ 2<\/code> \u2192 <code>1<\/code><\/td><\/tr><tr><td><\/td><td><code>%<\/code><\/td><td>Modulus (remainder of division)<\/td><td><code>3 % 2<\/code> \u2192 <code>1<\/code><\/td><\/tr><tr><td><\/td><td><code>**<\/code><\/td><td>Exponentiation (power)<\/td><td><code>3 ** 2<\/code> \u2192 <code>9<\/code><\/td><\/tr><tr><td><strong>Comparison<\/strong><\/td><td><code>==<\/code><\/td><td>Equal to<\/td><td><code>3 == 3<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><\/td><td><code>!=<\/code><\/td><td>Not equal to<\/td><td><code>3 != 2<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><\/td><td><code>&gt;<\/code><\/td><td>Greater than<\/td><td><code>3 &gt; 2<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><\/td><td><code>&lt;<\/code><\/td><td>Less than<\/td><td><code>3 &lt; 2<\/code> \u2192 <code>False<\/code><\/td><\/tr><tr><td><\/td><td><code>&gt;=<\/code><\/td><td>Greater than or equal to<\/td><td><code>3 &gt;= 2<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><\/td><td><code>&lt;=<\/code><\/td><td>Less than or equal to<\/td><td><code>3 &lt;= 2<\/code> \u2192 <code>False<\/code><\/td><\/tr><tr><td><strong>Logical<\/strong><\/td><td><code>and<\/code><\/td><td>Logical AND (both must be True)<\/td><td><code>True and False<\/code> \u2192 <code>False<\/code><\/td><\/tr><tr><td><\/td><td><code>or<\/code><\/td><td>Logical OR (at least one must be True)<\/td><td><code>True or False<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><\/td><td><code>not<\/code><\/td><td>Logical NOT (negates the value)<\/td><td><code>not True<\/code> \u2192 <code>False<\/code><\/td><\/tr><tr><td><strong>Identity<\/strong><\/td><td><code>is<\/code><\/td><td>Checks if two variables point to the same object in memory<\/td><td><code>a is b<\/code> \u2192 <code>True<\/code> or <code>False<\/code><\/td><\/tr><tr><td><\/td><td><code>is not<\/code><\/td><td>Checks if two variables do not point to the same object<\/td><td><code>a is not b<\/code> \u2192 <code>True<\/code> or <code>False<\/code><\/td><\/tr><tr><td><strong>Membership<\/strong><\/td><td><code>in<\/code><\/td><td>Checks if a value exists in a sequence (list, string, etc.)<\/td><td><code>'a' in 'apple'<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><\/td><td><code>not in<\/code><\/td><td>Checks if a value does not exist in a sequence<\/td><td><code>'z' not in 'apple'<\/code> \u2192 <code>True<\/code><\/td><\/tr><tr><td><strong>Assignment<\/strong><\/td><td><code>=<\/code><\/td><td>Assignment operator (assigns value to a variable)<\/td><td><code>x = 5<\/code><\/td><\/tr><tr><td><\/td><td><code>+=<\/code><\/td><td>Add and assign (increment by a value)<\/td><td><code>x += 5<\/code> \u2192 <code>x = x + 5<\/code><\/td><\/tr><tr><td><\/td><td><code>-=<\/code><\/td><td>Subtract and assign (decrement by a value)<\/td><td><code>x -= 5<\/code> \u2192 <code>x = x - 5<\/code><\/td><\/tr><tr><td><\/td><td><code>*=<\/code><\/td><td>Multiply and assign (multiply by a value)<\/td><td><code>x *= 5<\/code> \u2192 <code>x = x * 5<\/code><\/td><\/tr><tr><td><\/td><td><code>\/=<\/code><\/td><td>Divide and assign (divide by a value)<\/td><td><code>x \/= 5<\/code> \u2192 <code>x = x \/ 5<\/code><\/td><\/tr><tr><td><\/td><td><code>\/\/=<\/code><\/td><td>Floor divide and assign (integer division)<\/td><td><code>x \/\/= 5<\/code> \u2192 <code>x = x \/\/ 5<\/code><\/td><\/tr><tr><td><\/td><td><code>%=<\/code><\/td><td>Modulus and assign (assign remainder)<\/td><td><code>x %= 5<\/code> \u2192 <code>x = x % 5<\/code><\/td><\/tr><tr><td><\/td><td><code>**=<\/code><\/td><td>Exponentiate and assign (raise to a power)<\/td><td><code>x **= 5<\/code> \u2192 <code>x = x ** 5<\/code><\/td><\/tr><tr><td><\/td><td><code>&amp;=<\/code><\/td><td>Bitwise AND and assign<\/td><td><code>x &amp;= 3<\/code> \u2192 <code>x = x &amp; 3<\/code><\/td><\/tr><tr><td><\/td><td>`<\/td><td>=`<\/td><td>Bitwise OR and assign<\/td><\/tr><tr><td><\/td><td><code>^=<\/code><\/td><td>Bitwise XOR and assign<\/td><td><code>x ^= 3<\/code> \u2192 <code>x = x ^ 3<\/code><\/td><\/tr><tr><td><\/td><td><code>&lt;&lt;=<\/code><\/td><td>Left shift and assign<\/td><td><code>x &lt;&lt;= 3<\/code> \u2192 <code>x = x &lt;&lt; 3<\/code><\/td><\/tr><tr><td><\/td><td><code>&gt;&gt;=<\/code><\/td><td>Right shift and assign<\/td><td><code>x &gt;&gt;= 3<\/code> \u2192 <code>x = x &gt;&gt; 3<\/code><\/td><\/tr><tr><td><strong>Bitwise<\/strong><\/td><td><code>&amp;<\/code><\/td><td>Bitwise AND (bit by bit AND)<\/td><td><code>5 &amp; 3<\/code> \u2192 <code>1<\/code><\/td><\/tr><tr><td><\/td><td>`<\/td><td>`<\/td><td>Bitwise OR (bit by bit OR)<\/td><\/tr><tr><td><\/td><td><code>^<\/code><\/td><td>Bitwise XOR (bit by bit XOR)<\/td><td><code>5 ^ 3<\/code> \u2192 <code>6<\/code><\/td><\/tr><tr><td><\/td><td><code>~<\/code><\/td><td>Bitwise NOT (inverts all the bits)<\/td><td><code>~5<\/code> \u2192 <code>-6<\/code><\/td><\/tr><tr><td><\/td><td><code>&lt;&lt;<\/code><\/td><td>Bitwise left shift<\/td><td><code>5 &lt;&lt; 1<\/code> \u2192 <code>10<\/code><\/td><\/tr><tr><td><\/td><td><code>&gt;&gt;<\/code><\/td><td>Bitwise right shift<\/td><td><code>5 &gt;&gt; 1<\/code> \u2192 <code>2<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Keywords in Python<\/h2>\n\n\n\n<p>Keywords are reserved words in Python that have predefined meanings and cannot be used as variable names. The following is a list of Python keywords arranged in four columns:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Keyword<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Keyword<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>False<\/code><\/td><td>Represents the Boolean value false<\/td><td><code>None<\/code><\/td><td>Represents the absence of value<\/td><\/tr><tr><td><code>True<\/code><\/td><td>Represents the Boolean value true<\/td><td><code>and<\/code><\/td><td>Logical AND operator<\/td><\/tr><tr><td><code>as<\/code><\/td><td>Used to create an alias<\/td><td><code>assert<\/code><\/td><td>Used for debugging<\/td><\/tr><tr><td><code>async<\/code><\/td><td>Defines an asynchronous function<\/td><td><code>await<\/code><\/td><td>Awaits the result of an async call<\/td><\/tr><tr><td><code>break<\/code><\/td><td>Exits a loop prematurely<\/td><td><code>class<\/code><\/td><td>Used to define a class<\/td><\/tr><tr><td><code>continue<\/code><\/td><td>Skips the current loop iteration<\/td><td><code>def<\/code><\/td><td>Defines a function<\/td><\/tr><tr><td><code>del<\/code><\/td><td>Deletes an object<\/td><td><code>elif<\/code><\/td><td>Else if condition<\/td><\/tr><tr><td><code>else<\/code><\/td><td>Defines the else block<\/td><td><code>except<\/code><\/td><td>Handles exceptions<\/td><\/tr><tr><td><code>finally<\/code><\/td><td>Executes code after a try block<\/td><td><code>for<\/code><\/td><td>Starts a for loop<\/td><\/tr><tr><td><code>from<\/code><\/td><td>Imports specific parts of a module<\/td><td><code>global<\/code><\/td><td>Declares a global variable<\/td><\/tr><tr><td><code>if<\/code><\/td><td>Starts a conditional block<\/td><td><code>import<\/code><\/td><td>Imports a module<\/td><\/tr><tr><td><code>in<\/code><\/td><td>Checks for membership<\/td><td><code>is<\/code><\/td><td>Checks for object identity<\/td><\/tr><tr><td><code>lambda<\/code><\/td><td>Defines an anonymous function<\/td><td><code>nonlocal<\/code><\/td><td>Declares a non-local variable<\/td><\/tr><tr><td><code>not<\/code><\/td><td>Logical NOT operator<\/td><td><code>or<\/code><\/td><td>Logical OR operator<\/td><\/tr><tr><td><code>pass<\/code><\/td><td>Does nothing (placeholder)<\/td><td><code>raise<\/code><\/td><td>Raises an exception<\/td><\/tr><tr><td><code>return<\/code><\/td><td>Exits a function and returns a value<\/td><td><code>try<\/code><\/td><td>Starts a try block<\/td><\/tr><tr><td><code>while<\/code><\/td><td>Starts a while loop<\/td><td><code>with<\/code><\/td><td>Used for resource management<\/td><\/tr><tr><td><code>yield<\/code><\/td><td>Pauses and resumes a generator<\/td><td>sum<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Variables in Python<\/h2>\n\n\n\n<p>Variables are used to store data in memory. In Python, variables are created when you assign a value to them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rules for Naming Variables<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Variable names must start with a letter or an underscore (_).<\/li>\n\n\n\n<li>They can only contain alphanumeric characters and underscores.<\/li>\n\n\n\n<li>They are case-sensitive.<\/li>\n\n\n\n<li>Reserved keywords cannot be used as variable names.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Example:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>name = \"John\"  # String\nage = 25        # Integer\nheight = 5.9    # Float\nis_student = True  # Boolean\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Constants in Python<\/h2>\n\n\n\n<p>Constants are fixed values that do not change during the execution of a program. Python does not have built-in constant support, but conventionally, constants are written in uppercase letters.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>PI = 3.14159\nGRAVITY = 9.8\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Python Data Structures<\/h3>\n\n\n\n<p>Python provides several built-in data structures, each designed for specific tasks:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>my_list = [1, 2, 3]<\/code>  #List mutable datatype<br><br><code>my_tuple = (1, 2, 3)<\/code> #Tuple immutable datatype<br><br><code>my_set = {1, 2, 3}<\/code> #Set datatype an unordered collection of unique itm<br><br><code>my_dict = {\"name\": \"Alice\", \"age\": 30}<\/code> #Dictionary data (key:value)<br><br>my_string = \"Hello, World!\" #String data<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Indexing<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#Left to Right Indexing (0, 1, 2, 3 ... n)\na = &#91;5,8,6,2,4]\nprint (a&#91;0])# Output = 5\n#______________________________________\n#Right to left indexing (-1, -2, -3, ... -n)\na = &#91;5,8,6,2,4]\nprint (a&#91;-1]) #Output = 4<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Finding Sum in List<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>a = &#91;5,2,3]\nb = sum(a)\nprint(b) # Expected output 10<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Converting String to List<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>name = \"apple&amp;ball&amp;cat&amp;dog\"\nlist1 = name.split(\"&amp;\") #Create lists using separator &amp;\nprint(list1)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Finding Length<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>a = \"Hello World\"\nprint (len(a))\nb = &#91;5,6,7]\nprint (len(b))<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Working on Dictionary Data Type<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>dict1 = {\n    \"property\": \"house\",\n    \"department\": \"sugam\",\n    \"area\": 123,\n}\nb = dict1&#91;\"department\"] # Assign value of key department\nc= dict1.get(\"department\") #Assign value of key department by get method\nd = dict1.keys() # Assign all the keys of dictionary data dict1\ne = dict1.values() # Assign all values in e\nprint(b)\nprint(c)\nprint(d)\nprint(e)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">JSON (JavaScript Object Notation)<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is JSON?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>JSON<\/strong> (JavaScript Object Notation) is a lightweight data-interchange format that is easy to read and write for humans and machines.<\/li>\n\n\n\n<li>JSON is often used to exchange data between a server and a web application or between APIs.<\/li>\n\n\n\n<li>JSON data is structured using key-value pairs, similar to Python dictionaries.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>JSON Syntax<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>JSON objects are enclosed in curly braces <code>{}<\/code>.<\/li>\n\n\n\n<li>JSON arrays are enclosed in square brackets <code>[]<\/code>.<\/li>\n\n\n\n<li>Keys must be strings, and values can be strings, numbers, booleans, arrays, objects, or <code>null<\/code>.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Example of JSON Data:<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">{<br>  \"name\": \"Alice\", \"age\": 30, \"isStudent\": false, <br>  \"skills\": [\"Python\", \"JavaScript\", \"SQL\"],<br>  \"address\": {\"city\": \"New York\", \"zip\": \"10001\"}<br>}<br><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>JSON in Python<\/strong><\/h3>\n\n\n\n<p>Python provides a built-in library called <code>json<\/code> to handle JSON data. It allows you to encode (serialize) and decode (deserialize) JSON data easily. <\/p>\n\n\n\n<p>JSON is a vital tool for working with data in Python, especially in web development and APIs. Mastering how to handle JSON in Python ensures you&#8217;re ready to tackle real-world projects efficiently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Functions in the <code>json<\/code> Module<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Function<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>json.dump()<\/code><\/td><td>Serializes Python object to JSON and writes it to a file.<\/td><\/tr><tr><td><code>json.dumps()<\/code><\/td><td>Serializes Python object to a JSON string.<\/td><\/tr><tr><td><code>json.load()<\/code><\/td><td>Deserializes JSON data from a file into a Python object.<\/td><\/tr><tr><td><code>json.loads()<\/code><\/td><td>Deserializes a JSON string into a Python object.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Serialization and Deserialization<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Serialization<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Python object \u2192 JSON.<\/li>\n\n\n\n<li>Example: Sending data to an API client.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Deserialization<\/strong>:\n<ul class=\"wp-block-list\">\n<li>JSON \u2192 Python object.<\/li>\n\n\n\n<li>Example: Receiving data from an API client.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Mutable Data Type Exercise<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>fruits = &#91;'apple', 'banana', 'cherry']\nnum1 = &#91;5,8,4,9,5]\n# Modify the second item\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">fruits&#91;1] = 'orange'<\/mark>\n\nprint(fruits)  # Expected output: &#91;'apple', 'orange', 'cherry']\nprint(num1) # Expected output: &#91;5,8,4,9,5]\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">fruits.append('grape')\nnum1.append(7<\/mark>)\nprint(fruits)  # Expected output: &#91;'apple', 'orange', 'cherry', <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">'grape'<\/mark>]\nprint(num1) # Expected output: &#91;5,8,4,9,5,<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">7<\/mark>]\n\n#_____________________________________________________________\n\nperson = {'name': 'Alice', 'age': 25}\n# Modify the value of the 'age' key\nperson&#91;'age'] = 26\nprint(person)  # Expected output: {'name': 'Alice', 'age': 26}\n\nperson&#91;'city'] = 'New York'\nprint(person)  \n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Combining Two List<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>name= &#91;\"ram\",\"sita\",\"hari\"]\nphone_no = &#91;971663,456885,155665]\n\nname_with_no_memo = zip(name,phone_no)\n\nprint(name_with_no_memo) #It gives memory address\n\nname_with_no = list(name_with_no_memo)\nprint(name_with_no) # It display real list<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conditional Statements in Python<\/h2>\n\n\n\n<p>Conditional statements are used to execute code blocks based on certain conditions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. if Statement<\/h3>\n\n\n\n<p>The <code>if<\/code> statement is used to test a condition. If the condition is <code>True<\/code>, the block of code is executed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>x = 10\nif x &gt; 5:\n    print(\"x is greater than 5\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. if-else Statement<\/h3>\n\n\n\n<p>The <code>if-else<\/code> statement allows you to execute one block of code if the condition is <code>True<\/code> and another if it is <code>False<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>x = 10\nif x % 2 == 0:\n    print(\"x is even\")\nelse:\n    print(\"x is odd\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. if-elif-else Statement<\/h3>\n\n\n\n<p>The <code>if-elif-else<\/code> statement is used to check multiple conditions.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>x = 20\nif x &lt; 10:\n    print(\"x is less than 10\")\nelif x &lt; 20:\n    print(\"x is between 10 and 19\")\nelse:\n    print(\"x is 20 or greater\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. Nested Conditional Statements<\/h3>\n\n\n\n<p>You can nest conditional statements inside one another.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>x = 15\nif x &gt; 10:\n    if x &lt; 20:\n        print(\"x is between 11 and 19\")\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Loops in Python<\/h2>\n\n\n\n<p>Python provides different types of loops to perform repetitive tasks efficiently.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. <strong>for Loop<\/strong><\/h4>\n\n\n\n<p>Used to iterate(going through each element one by one. Verbal Meaning; iteration: repetition) over a sequence (list, tuple, dictionary, etc.).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">for item in iterable:<br>    # Code to execute for each item<br><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">for i in range(5):<br>    print(i)  # Outputs numbers from 0 to 4<br>#________________________________<br><br>a= (9,8,6,7,5)<br>print(a)  # Print non iterated item<br>for i in a:<br>    print (i) #Print iterated item<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. <strong>while Loop<\/strong><\/h4>\n\n\n\n<p>Repeats code as long as a condition is true.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">while condition:<br>    # Code to execute as long as condition is true<br><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">i = 0<br>while i &lt; 5:<br>    print(i)<br>    i += 1  # Outputs numbers from 0 to 4<br><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. <strong>break and continue Statements<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>break<\/code><\/strong>: Exits the loop.<\/li>\n\n\n\n<li><strong><code>continue<\/code><\/strong>: Skips the rest of the current iteration and moves to the next.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">for i in range(10):<br>    if i == 5:<br>        break  # Exits the loop<br>    if i % 2 == 0:<br>        continue  # Skips even numbers<br>    print(i)<br><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Error Handling in Python<\/h3>\n\n\n\n<p>Python\u2019s error handling mechanism allows you to handle exceptions and ensure smooth program execution. Here\u2019s how it works:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">try:<br>    # Code that may raise an exception<br>except ExceptionType:<br>    # Code to execute if an exception occurs<br><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">try:<br>    num = int(input(\"Enter a number: \"))<br>    result = 10 \/ num<br>except ValueError:<br>    print(\"Invalid input! Please enter a number.\")<br>except ZeroDivisionError:<br>    print(\"Cannot divide by zero!\")<br>else:<br>    print(f\"Result: {result}\")<br>finally:<br>    print(\"Execution completed.\")<br><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>else<\/code><\/strong>: Runs if no exception occurs.<\/li>\n\n\n\n<li><strong><code>finally<\/code><\/strong>: Runs no matter what, ensuring cleanup (e.g., closing files).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Functions in Python<\/h3>\n\n\n\n<p>Functions allow you to group code into reusable blocks. You can define a function using the <code>def<\/code> keyword.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Defining Functions<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">def function_name(parameters):<br>    # Code block<br>    return result  # Optional<br><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def greet(name):<br>    return f\"Hello, {name}!\"<br><br>print(greet(\"Alice\"))  # Outputs: Hello, Alice!<br><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Default Parameters<\/strong><\/h4>\n\n\n\n<p>Functions can have default parameters, making them optional during function calls.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def greet(name=\"Guest\"):<br>    return f\"Hello, {name}!\"<br>    <br>print(greet())  # Outputs: Hello, Guest!<br><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Lambda Functions<\/strong><\/h4>\n\n\n\n<p>Short, anonymous functions defined with the <code>lambda<\/code> keyword.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add = lambda x, y: x + y<br>print(add(2, 3))  # Outputs: 5<br><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Variable-Length Arguments<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>*args<\/code><\/strong>: Collects extra positional arguments as a tuple.<\/li>\n\n\n\n<li><strong><code>**kwargs<\/code><\/strong>: Collects extra keyword arguments as a dictionary.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def print_info(*args, **kwargs):\n    print(args)  # Tuple of positional arguments\n    print(kwargs)  # Dictionary of keyword arguments\n\nprint_info(1, 2, 3, name=\"Alice\", age=30)\n# Outputs:\n# (1, 2, 3)\n# {'name': 'Alice', 'age': 30}d to iterate over a<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Libraries in Python<\/h2>\n\n\n\n<p><strong>AI Libraries<\/strong><\/p>\n\n\n\n<p>ChatGPT:    pip install openai<\/p>\n\n\n\n<p>Gemini:   pip install google-generativeai<\/p>\n\n\n\n<p>Claude:   pip install anthropic<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is a high-level, interpreted, and dynamically typed programming language. It was created by Guido van Rossum and first released [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":null,"ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":null,"ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":null,"ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":null,"stick-header-meta":null,"header-above-stick-meta":null,"header-main-stick-meta":null,"header-below-stick-meta":null,"astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[11,13],"tags":[],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-programming","category-python-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to Python Programming Language - Bioinformatics Notes<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to Python Programming Language - Bioinformatics Notes\" \/>\n<meta property=\"og:description\" content=\"Python is a high-level, interpreted, and dynamically typed programming language. It was created by Guido van Rossum and first released [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/\" \/>\n<meta property=\"og:site_name\" content=\"Bioinformatics Notes\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bioinformaticsnotes\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/pokharelsugam.com.np\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-25T06:26:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-19T15:44:42+00:00\" \/>\n<meta name=\"author\" content=\"Sugam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pokharel_sugam\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sugam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/\"},\"author\":{\"name\":\"Sugam\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#\\\/schema\\\/person\\\/35f4d57cc2e78f6c92a357133a5e4747\"},\"headline\":\"Introduction to Python Programming Language\",\"datePublished\":\"2025-01-25T06:26:16+00:00\",\"dateModified\":\"2025-12-19T15:44:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/\"},\"wordCount\":1464,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#organization\"},\"articleSection\":[\"Programming\",\"Python Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/\",\"url\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/\",\"name\":\"Introduction to Python Programming Language - Bioinformatics Notes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#website\"},\"datePublished\":\"2025-01-25T06:26:16+00:00\",\"dateModified\":\"2025-12-19T15:44:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/introduction-python-programming-language\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to Python Programming Language\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#website\",\"url\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/\",\"name\":\"Bioinformatics Notes\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#organization\",\"name\":\"Bioinformatics Notes\",\"url\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2025\\\/01\\\/cropped-cropped-Bioinformatics_Notes_Logo.png\",\"contentUrl\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/wp-content\\\/uploads\\\/sites\\\/6\\\/2025\\\/01\\\/cropped-cropped-Bioinformatics_Notes_Logo.png\",\"width\":461,\"height\":293,\"caption\":\"Bioinformatics Notes\"},\"image\":{\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/bioinformaticsnotes\\\/\",\"https:\\\/\\\/github.com\\\/pokharelsugam\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/#\\\/schema\\\/person\\\/35f4d57cc2e78f6c92a357133a5e4747\",\"name\":\"Sugam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/775860ea034c0c86990dad8f198568e219e4d183f79d82f52b1ac35c9bca5c10?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/775860ea034c0c86990dad8f198568e219e4d183f79d82f52b1ac35c9bca5c10?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/775860ea034c0c86990dad8f198568e219e4d183f79d82f52b1ac35c9bca5c10?s=96&d=mm&r=g\",\"caption\":\"Sugam\"},\"description\":\"M.Sc. Bioinformatics (Pokhara University) -Running B.Sc. Microbiology (Tribhuvan University)\",\"sameAs\":[\"https:\\\/\\\/pokharelsugam.com.np\",\"https:\\\/\\\/www.facebook.com\\\/pokharelsugam.com.np\\\/\",\"https:\\\/\\\/www.instagram.com\\\/pokharelsugam.com.np\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sugam-pokharel-40077913b\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/pokharel_sugam\\\/\",\"https:\\\/\\\/x.com\\\/pokharel_sugam\",\"https:\\\/\\\/www.youtube.com\\\/@pokharel_sugam\",\"https:\\\/\\\/www.tumblr.com\\\/pokharelsugam\"],\"url\":\"https:\\\/\\\/pokharelsugam.com.np\\\/bioinformatics\\\/author\\\/pokharelsugam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to Python Programming Language - Bioinformatics Notes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to Python Programming Language - Bioinformatics Notes","og_description":"Python is a high-level, interpreted, and dynamically typed programming language. It was created by Guido van Rossum and first released [&hellip;]","og_url":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/","og_site_name":"Bioinformatics Notes","article_publisher":"https:\/\/www.facebook.com\/bioinformaticsnotes\/","article_author":"https:\/\/www.facebook.com\/pokharelsugam.com.np\/","article_published_time":"2025-01-25T06:26:16+00:00","article_modified_time":"2025-12-19T15:44:42+00:00","author":"Sugam","twitter_card":"summary_large_image","twitter_creator":"@pokharel_sugam","twitter_misc":{"Written by":"Sugam","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/#article","isPartOf":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/"},"author":{"name":"Sugam","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#\/schema\/person\/35f4d57cc2e78f6c92a357133a5e4747"},"headline":"Introduction to Python Programming Language","datePublished":"2025-01-25T06:26:16+00:00","dateModified":"2025-12-19T15:44:42+00:00","mainEntityOfPage":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/"},"wordCount":1464,"commentCount":0,"publisher":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#organization"},"articleSection":["Programming","Python Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/","url":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/","name":"Introduction to Python Programming Language - Bioinformatics Notes","isPartOf":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#website"},"datePublished":"2025-01-25T06:26:16+00:00","dateModified":"2025-12-19T15:44:42+00:00","breadcrumb":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/introduction-python-programming-language\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pokharelsugam.com.np\/bioinformatics\/"},{"@type":"ListItem","position":2,"name":"Introduction to Python Programming Language"}]},{"@type":"WebSite","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#website","url":"https:\/\/pokharelsugam.com.np\/bioinformatics\/","name":"Bioinformatics Notes","description":"","publisher":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pokharelsugam.com.np\/bioinformatics\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#organization","name":"Bioinformatics Notes","url":"https:\/\/pokharelsugam.com.np\/bioinformatics\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#\/schema\/logo\/image\/","url":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-content\/uploads\/sites\/6\/2025\/01\/cropped-cropped-Bioinformatics_Notes_Logo.png","contentUrl":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-content\/uploads\/sites\/6\/2025\/01\/cropped-cropped-Bioinformatics_Notes_Logo.png","width":461,"height":293,"caption":"Bioinformatics Notes"},"image":{"@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/bioinformaticsnotes\/","https:\/\/github.com\/pokharelsugam"]},{"@type":"Person","@id":"https:\/\/pokharelsugam.com.np\/bioinformatics\/#\/schema\/person\/35f4d57cc2e78f6c92a357133a5e4747","name":"Sugam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/775860ea034c0c86990dad8f198568e219e4d183f79d82f52b1ac35c9bca5c10?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/775860ea034c0c86990dad8f198568e219e4d183f79d82f52b1ac35c9bca5c10?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/775860ea034c0c86990dad8f198568e219e4d183f79d82f52b1ac35c9bca5c10?s=96&d=mm&r=g","caption":"Sugam"},"description":"M.Sc. Bioinformatics (Pokhara University) -Running B.Sc. Microbiology (Tribhuvan University)","sameAs":["https:\/\/pokharelsugam.com.np","https:\/\/www.facebook.com\/pokharelsugam.com.np\/","https:\/\/www.instagram.com\/pokharelsugam.com.np\/","https:\/\/www.linkedin.com\/in\/sugam-pokharel-40077913b\/","https:\/\/www.pinterest.com\/pokharel_sugam\/","https:\/\/x.com\/pokharel_sugam","https:\/\/www.youtube.com\/@pokharel_sugam","https:\/\/www.tumblr.com\/pokharelsugam"],"url":"https:\/\/pokharelsugam.com.np\/bioinformatics\/author\/pokharelsugam\/"}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sugam","author_link":"https:\/\/pokharelsugam.com.np\/bioinformatics\/author\/pokharelsugam\/"},"uagb_comment_info":0,"uagb_excerpt":"Python is a high-level, interpreted, and dynamically typed programming language. It was created by Guido van Rossum and first released [&hellip;]","_links":{"self":[{"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":54,"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":1118,"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/posts\/257\/revisions\/1118"}],"wp:attachment":[{"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pokharelsugam.com.np\/bioinformatics\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}