<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eric Mutua</title>
    <description>The latest articles on DEV Community by Eric Mutua (@am_eric).</description>
    <link>https://dev.to/am_eric</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F811932%2F3b146ccb-1275-4d5d-927e-f4cce4b0e216.jpeg</url>
      <title>DEV Community: Eric Mutua</title>
      <link>https://dev.to/am_eric</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/am_eric"/>
    <language>en</language>
    <item>
      <title>Python for Everyone: Mastering Python the right way</title>
      <dc:creator>Eric Mutua</dc:creator>
      <pubDate>Fri, 04 Mar 2022 09:32:41 +0000</pubDate>
      <link>https://dev.to/am_eric/python-for-everyone-mastering-python-the-right-way-761</link>
      <guid>https://dev.to/am_eric/python-for-everyone-mastering-python-the-right-way-761</guid>
      <description>&lt;p&gt;Well, your path to become a python guru is on track. Here we shall discuss on how to master python the right way.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;THE BASICS!!&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The basics of any programming language are fundamental in mastering the language as a whole.&lt;br&gt;
Learning the fundamentals of python will give you the basic understanding of python. For starters, you can catch up with the basics of python programming here:&lt;br&gt;
&lt;a href="https://dev.tourl"&gt;https://dev.to/am_eric/python-101-getting-started-1np2&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;INTERMEDIATE PYTHON&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Next on track is intermediate python. Here you will get to understand data structures and algorithms and their implementation.Learn data structures and algorithms with me at&lt;br&gt;
&lt;a href="https://dev.tourl"&gt;https://dev.to/am_eric/introduction-to-data-structures-and-algorithms-with-python-51fp&lt;/a&gt;.&lt;br&gt;
Once equipped with these skills, you can now decide on your preferable track. It may be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Web development&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Data Science&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Artificial Intelligence and Machine Learning&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Game Development&lt;/em&gt; among others.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;ADVANCED PYTHON&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For web development, frameworks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Django&lt;/em&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Flask&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Pyramid&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Falcon&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most popular frameworks are Django and Flask. &lt;br&gt;
&lt;em&gt;Django&lt;/em&gt; - is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.&lt;br&gt;
&lt;em&gt;Flask&lt;/em&gt; - is a lightweight python framework that provides the tools necessary to create robust web applications.&lt;br&gt;
Lets take a dive into Django.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Introduction to Django&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Requirements&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You should at least have some knowledge in python programming before trying out a framework.&lt;/li&gt;
&lt;li&gt;You should have python installed in your PC.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Installation&lt;/em&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;On your &lt;code&gt;cmd&lt;/code&gt; on windows, do &lt;br&gt;
&lt;code&gt;pip install django&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Wait till the installation is completed.&lt;br&gt;
Check the django version installed. Do&lt;br&gt;
&lt;code&gt;py -m django --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next,create a virtual environment. Do&lt;br&gt;
&lt;code&gt;mkvirtualenv myapp&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;in an instance where it throws an error -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'mkvirtualenv' is not recognized as an internal or external command,
operable program or batch file.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DO:&lt;br&gt;
&lt;code&gt;pip install virtualenvwrapper-win&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then &lt;/p&gt;

&lt;p&gt;&lt;code&gt;mkvirtualenv myapp&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Inside the virtual env:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(myapp) C:\Users\Eric&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do:&lt;br&gt;
&lt;code&gt;pip install django&lt;/code&gt;&lt;br&gt;
to install django on the virtual environment&lt;/p&gt;

&lt;p&gt;then&lt;br&gt;
&lt;code&gt;django-admin startproject myproject&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(myapp) C:\Users\Eric&amp;gt;django-admin startproject myproject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you can alter 'myproject' with the name of your preferred project.&lt;/p&gt;

&lt;p&gt;Next, open the project on your preferred compilier.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Creating apps in myproject&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Do:&lt;br&gt;
&lt;code&gt;python manage.py startapp myapp&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(myapp) C:\Users\Eric&amp;gt;python manage.py startapp myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creating an app would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myapp/
    __init__.py
    admin.py
    apps.py
    migrations/
        __init__.py
    models.py
    tests.py
    views.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;&lt;em&gt;Getting the First Output in Django&lt;/em&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;We use the &lt;code&gt;views.py&lt;/code&gt; to return responses to the screen.&lt;br&gt;
At the &lt;code&gt;views.py&lt;/code&gt;, do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.shortcuts import render
from django.http import HttpResponse

def index(request):
    return HttpResponse(&amp;lt;h2&amp;gt;"Welcome to my first django application"&amp;lt;/h2&amp;gt;)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next step is the ####&lt;strong&gt;URL-routing&lt;/strong&gt;&lt;br&gt;
Create a new python file and name it &lt;code&gt;urls.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myapp/
    __init__.py
    admin.py
    apps.py
    migrations/
        __init__.py
    models.py
    tests.py
    urls.py
    views.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At&lt;code&gt;urls.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.urls import path

from . import views

urlpatterns = [
    path('', views.index, name='index'),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run the project.&lt;/p&gt;

&lt;p&gt;DO:&lt;br&gt;
&lt;code&gt;python manage.py runserver&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The output will be;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Performing system checks...

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

March 01, 2022 - 15:50:53
Django version 4.0, using settings 'myapp.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that the server is running, visit &lt;a href="http://127.0.0.1:8000/"&gt;http://127.0.0.1:8000/&lt;/a&gt; at your web browser&lt;/p&gt;

&lt;p&gt;Next,point the root URLconf at the myapp.urls module.&lt;br&gt;
At &lt;code&gt;myproject/urls.py&lt;/code&gt; , do;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.contrib import admin
from django.urls import include, path

urlpatterns = [
    path('', include('myapp.urls')),
    path('admin/', admin.site.urls),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;include()&lt;/code&gt; function allows referencing other URLconfs.&lt;/p&gt;

&lt;p&gt;Finally, run the server again and refresh the page.&lt;/p&gt;

&lt;p&gt;Do:&lt;br&gt;
&lt;code&gt;python manage.py runserver&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The output 'Welcome to my first django application' should be visible from the page.&lt;/p&gt;

&lt;p&gt;Thank You for taking time to read this article. Follow for more.&lt;/p&gt;

</description>
      <category>python</category>
      <category>codewithme</category>
      <category>luxacademy</category>
      <category>django</category>
    </item>
    <item>
      <title>Introduction to Data Structures and Algorithms With Python. </title>
      <dc:creator>Eric Mutua</dc:creator>
      <pubDate>Sun, 20 Feb 2022 20:26:49 +0000</pubDate>
      <link>https://dev.to/am_eric/introduction-to-data-structures-and-algorithms-with-python-51fp</link>
      <guid>https://dev.to/am_eric/introduction-to-data-structures-and-algorithms-with-python-51fp</guid>
      <description>&lt;h2&gt;
  
  
  Data Structures
&lt;/h2&gt;

&lt;p&gt;Python has four inbuilt basic data structures which are:&lt;br&gt;
Lists, Dictionary, Tuple and Sets.&lt;br&gt;
To start with:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Lists&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Lists can be used for any type of object. From numbers to string and also lists.&lt;br&gt;
Lists are defined by brackets - &lt;code&gt;[]&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers = [4,5,6]
print(type(numbers))

output:

&amp;lt;class 'list'&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lists can also be defined by using the keyword &lt;code&gt;list()&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers = list()
numbers.append(4)
numbers.append(5)
numbers.append(6)
print(numbers)
[4, 5, 6]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are set of built-in methods used with lists.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;append()&lt;/code&gt; - Adds an element at the end of the list&lt;br&gt;
&lt;code&gt;clear()&lt;/code&gt; - Removes the elements of a list&lt;br&gt;
&lt;code&gt;copy()&lt;/code&gt; - Returns a copy of the list&lt;br&gt;
&lt;code&gt;pop()&lt;/code&gt;  - Removes the element at the specified position&lt;br&gt;
&lt;code&gt;insert()&lt;/code&gt; - Adds an element at the specified position&lt;br&gt;
&lt;code&gt;reverse()&lt;/code&gt; - Reverses the order of the list&lt;br&gt;
&lt;code&gt;sort()&lt;/code&gt; - Sorts the list&lt;br&gt;
&lt;code&gt;remove&lt;/code&gt; - removes the first item with the specified value&lt;br&gt;
&lt;code&gt;count&lt;/code&gt; - returns the number of elements with the specified value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Dictionary&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Dictionaries referred to as hashmaps in other languages. It consists of key, value pairs. Key are unique and immutable objects.&lt;br&gt;
Each key and value pair are seperated by a colon.&lt;br&gt;
Dictionaries are defined by curly brackets &lt;code&gt;{}&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dict = {'name': 'Eric', 'age': 19}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are also a set of inbuilt python dictionary methods&lt;/p&gt;

&lt;p&gt;&lt;code&gt;clear()&lt;/code&gt; - Removes all items from a dictionary&lt;br&gt;
&lt;code&gt;copy()&lt;/code&gt; - Returns a copy of the dictionary&lt;br&gt;
&lt;code&gt;get()&lt;/code&gt; - gets the value of the specified parameter&lt;br&gt;
&lt;code&gt;items()&lt;/code&gt; - gets all items of a dictionary in the key value format&lt;br&gt;
&lt;code&gt;popitem()&lt;/code&gt; - Removes and returns the last element in the dictionary&lt;br&gt;
&lt;code&gt;update()&lt;/code&gt; - updates the dictionary with the key-value pairs&lt;br&gt;
&lt;code&gt;keys()&lt;/code&gt; - returns a list containing the dictionary's keys&lt;br&gt;
&lt;code&gt;values()&lt;/code&gt; - returns a list of all the values in the dictionary&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tuple&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
A tuples is ordered and immutable.&lt;br&gt;
Duplicates are allowed in tuples.&lt;br&gt;
Tuples are defined with brackets &lt;code&gt;()&lt;/code&gt; and are indexed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mytuple = ("cat", "mouse", "cow", "chicken")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tuples can be accessed through indexing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mytuple = ("cat", "mouse", "cow", "chicken")
print(mytuple[1])

# output:

mouse
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Sets&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Sets are unordered, immutable and unindexed. &lt;br&gt;
Duplicates are not allowed in sets&lt;br&gt;
Sets are defined with curly brackets &lt;code&gt;{}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myset = {"cat", "mouse", "cow", "chicken"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are built-in set methods.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;add()&lt;/code&gt; - Adds an element to the set&lt;br&gt;
&lt;code&gt;clear()&lt;/code&gt; - removes all the elements from the set&lt;br&gt;
&lt;code&gt;copy()&lt;/code&gt; - returns a copy of the set&lt;br&gt;
&lt;code&gt;discard()&lt;/code&gt; - removes the specified item&lt;br&gt;
&lt;code&gt;pop()&lt;/code&gt; - removes an element from the set&lt;br&gt;
&lt;code&gt;update()&lt;/code&gt; - updates the set with another set&lt;br&gt;
&lt;code&gt;remove()&lt;/code&gt; - removes the specified item&lt;/p&gt;
&lt;h2&gt;
  
  
  Algorithms
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Queues&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
A queue is an abstract data structure that is open on both sides hence use first in first out basis FIFO.&lt;br&gt;
A queue has two ends; &lt;code&gt;front&lt;/code&gt; and &lt;code&gt;rear&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kaRRxkcp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbaznxe8x99ipgswn33t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kaRRxkcp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbaznxe8x99ipgswn33t.png" alt="Queues" width="314" height="215"&gt;&lt;/a&gt;&lt;br&gt;
The two operations involved with queues are &lt;code&gt;enqueue&lt;/code&gt; and &lt;code&gt;dequeue&lt;/code&gt;.&lt;br&gt;
Enqueue involves inserting items in a queue while dequeue is the process of removing items.&lt;/p&gt;

&lt;p&gt;Methods involved in queues include:&lt;br&gt;
&lt;code&gt;push(item)&lt;/code&gt; - used to insert an element to the queue.&lt;br&gt;
&lt;code&gt;pop(item)&lt;/code&gt;  - used to remove an element from the queue.&lt;br&gt;
&lt;code&gt;get()&lt;/code&gt; - used to extract an element from the queue.&lt;br&gt;
&lt;code&gt;empty()&lt;/code&gt; - check whether a queue is empty or not.&lt;br&gt;
&lt;code&gt;full()&lt;/code&gt; - check whether a queue is full.&lt;/p&gt;

&lt;p&gt;Implementation of queues using list in python&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q = []
def Enqueue():
    if len(q) == size:
        print('Queue is full')
    else:
        number = input('Enter numbers-:')
        q.append(number)
        print(number,'number added to the queue')

def dequeue():
    if len(queue) == 0:
        print('queue is empty')
    else:
        del = q.pop(0)
        print('Element removed',del)

def display():
    size = input('Enter size of the queue')
    while True:
        print("Select the Operation:1.Add 2.Delete 3. Display 4. Quit")
        choice=int(input())
        if choice==1:
            Enqueue()
        elif choice==2:
            dequeue()
        elif choice==3:
            display()
        elif choice==4:
            break
        else:
            print("Invalid Choice =(")


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stacks&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A stack is a linear data structure that stores items in a last-in-First-Out order.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EqgR4yGj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zguwz910k1ah210bju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EqgR4yGj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zguwz910k1ah210bju.png" alt="Stacks" width="455" height="241"&gt;&lt;/a&gt;&lt;br&gt;
A stack is open on one side hence a new item is added at one end and removed from that end only.&lt;/p&gt;

&lt;p&gt;The methods involved with stacks are:&lt;br&gt;
&lt;code&gt;empty()&lt;/code&gt; - returns whether stack is empty.&lt;br&gt;
&lt;code&gt;size()&lt;/code&gt; - returns size of the stack.&lt;br&gt;
&lt;code&gt;top()&lt;/code&gt;  - returns a reference to the topmost element of the stack.&lt;br&gt;
&lt;code&gt;push()&lt;/code&gt; - inserts items at the top of the stack.&lt;br&gt;
&lt;code&gt;pop()&lt;/code&gt; - Deletes the topmost element of the stack.&lt;/p&gt;

&lt;p&gt;Implementation using list&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stack = []

#append() used to push items into stack
stack.append('a')
stack.append('b')
stack.append('c')

print(stack)

#pop() removes items from stack

print(stack.pop())
print(stack.pop())
print(stack.pop())

#elements after being popped
print(stack)


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Linked Lists&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
A linked list is a sequence of data elements which are connected via links.&lt;br&gt;
Each link contains connection to another link.&lt;br&gt;
Python does not have linked lists in its standard library.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F7yGCOfw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/veg9ckbsblkq31ls00c7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F7yGCOfw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/veg9ckbsblkq31ls00c7.png" alt="Linked Lists" width="619" height="200"&gt;&lt;/a&gt;&lt;br&gt;
The first node is also known as the &lt;em&gt;HEAD&lt;/em&gt;. It is used as a reference to traverse the list.&lt;br&gt;
The last node points to &lt;em&gt;NULL&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;&lt;strong&gt;Types of Linked Lists&lt;/strong&gt;&lt;/em&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Singly linked list&lt;/em&gt; - traversed in forward direction&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Doubly linked list&lt;/em&gt; - traversed in forward and back directions&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Circular singly linked list&lt;/em&gt; - the last element contains link to the first element as next&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Circular Doubly linked list&lt;/em&gt; - the last element contains link to the first element as next and the first element contains link of the last element as previous.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Implementation of nodes using classes

class Node:
  #constructor to create a new node
  def __init__(self, data):
    self.data = data
    self.next = None


class LinkedList:
  #constructor to create an empty LinkedList
  def __init__(self):
    self.head = None

# create an empty LinkedList                 
MyList = LinkedList()

#Add first node.
first = Node(1)
#linking with head node
MyList.head = first

#Add second node.
second = Node(2)
#linking with first node
first.next = second

#Add third node.
third = Node(3)
#linking with second node
second.next = third

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you for reading this article. I hope it was of great assistance understanding data structures and algorithms with python.&lt;/p&gt;

</description>
      <category>python</category>
      <category>luxacademy</category>
      <category>codewithme</category>
    </item>
    <item>
      <title>PYTHON 101; GETTING STARTED</title>
      <dc:creator>Eric Mutua</dc:creator>
      <pubDate>Wed, 09 Feb 2022 09:40:09 +0000</pubDate>
      <link>https://dev.to/am_eric/python-101-getting-started-1np2</link>
      <guid>https://dev.to/am_eric/python-101-getting-started-1np2</guid>
      <description>&lt;h2&gt;
  
  
  ** WHAT IS PYTHON**
&lt;/h2&gt;

&lt;p&gt;First released in 1991 and created by Guido van Rossum, python is an interpreted, high-level and general-purpose programming language. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;GETTING STARTED&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Python Installation&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;You can download the various versions of python through your preferred browser(preferred versions 3.6+). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n8agui3K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2khhopg4ewn7eu69y7d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n8agui3K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2khhopg4ewn7eu69y7d.png" alt="Python Installation" width="716" height="574"&gt;&lt;/a&gt;&lt;br&gt;
 Clicking on download will download python.&lt;br&gt;
 Click on the..exe file to set up python in your computer&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing the First Code&lt;/strong&gt;&lt;br&gt;
Open the &lt;em&gt;Command Prompt&lt;/em&gt; and type python&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a6iwfcOQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzkk34dtrzhd1aeqemp8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a6iwfcOQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzkk34dtrzhd1aeqemp8.png" alt="CMD" width="779" height="120"&gt;&lt;/a&gt;&lt;br&gt;
You will be able to access Python.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print(Hello World)&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  FUNDAMENTALS OF PYTHON
&lt;/h2&gt;

&lt;p&gt;Here we get to know Python;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strings and Comments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operators&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lists &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dictionaries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sets&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Functions&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Variables&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;variable&lt;/strong&gt; is a storage location (Identified by the memory adress) paired with an associated symbolic name(an identifier), which contains some known or unknown quantity of information refered to as a value.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;name= eric&lt;/code&gt;&lt;br&gt;
&lt;code&gt;age= 19&lt;/code&gt;&lt;br&gt;
 &lt;em&gt;name&lt;/em&gt; and &lt;em&gt;age&lt;/em&gt; are variables&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Strings and Comments&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;#&lt;/code&gt; is used to convert a string to a comment&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print("hello world")&lt;/code&gt;&lt;br&gt;
&lt;code&gt;#print ("Hello world")&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Operators&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;There are different types of operators&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Boolean&lt;br&gt;
Boolean values are two which are &lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Comprison&lt;br&gt;
Comparison operators are &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Equal                  (&lt;code&gt;==&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;       Not equal              (&lt;code&gt;!=&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;       Greater than           (&lt;code&gt;&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;       Less than              (&lt;code&gt;&amp;lt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;       Greater or equal to    (&lt;code&gt;&amp;gt;=&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;       Less than or equal to  (&lt;code&gt;&amp;lt;=&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Logical
   &lt;code&gt;and&lt;/code&gt; 
   &lt;code&gt;or&lt;/code&gt;
   &lt;code&gt;not&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Lists&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fCvFoIw3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gllzc3z4d6cznphhapsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fCvFoIw3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gllzc3z4d6cznphhapsn.png" alt="Lists in python" width="395" height="87"&gt;&lt;/a&gt;&lt;br&gt;
In lists, characters are enclosed in brackets [].&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Dictionaries&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Items are stored in a key, value pair in a dictionary.&lt;br&gt;
Dictionaries are defined using curly braces &lt;code&gt;{}&lt;/code&gt; and are ordered. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bjwLqySw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omj9hy9epolynu60c8fq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bjwLqySw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omj9hy9epolynu60c8fq.png" alt="Dictionaries in Python" width="358" height="96"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Sets&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Sets are defined using curly braces &lt;code&gt;{}&lt;/code&gt; and are unordered.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ages = {19,20,21,22,23}
ages
{19,20,21,22,23}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;em&gt;Functions&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;A function is a block of code that runs when it is called.&lt;br&gt;
a function is defined with the &lt;code&gt;def&lt;/code&gt; keyword.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def name():
    print('eric')

name()
eric
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, name() is calls the function to execute.&lt;/p&gt;

&lt;p&gt;In Conclusion, that was an overview of getting strarted with python programming for beginners. As part of LUX Academy,i am happy to be here. &lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>luxacademy</category>
    </item>
  </channel>
</rss>
