<?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: YoungWonks</title>
    <description>The latest articles on DEV Community by YoungWonks (@youngwonks).</description>
    <link>https://dev.to/youngwonks</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%2F633276%2F8aa8c4f4-389f-43ea-a715-6e0ff916ff84.png</url>
      <title>DEV Community: YoungWonks</title>
      <link>https://dev.to/youngwonks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/youngwonks"/>
    <language>en</language>
    <item>
      <title>Automating tasks with PyAutoGUI</title>
      <dc:creator>YoungWonks</dc:creator>
      <pubDate>Fri, 11 Feb 2022 06:17:16 +0000</pubDate>
      <link>https://dev.to/youngwonks/automating-tasks-with-pyautogui-2hg7</link>
      <guid>https://dev.to/youngwonks/automating-tasks-with-pyautogui-2hg7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the most exciting aspects of working with computers all day is the potential to automate. Unlike the most mundane real-life tasks we have to drag ourselves through each day, computers permit us to live a power fantasy, one where we dictate the terms and they do our bidding, over and over with nary a complaint. As we realize this power fantasy, let's be what's called a taskmaster.&lt;/p&gt;

&lt;p&gt;Python is an extremely powerful language, partly due to the plethora of modules available to import and use. As taskmasters, we begin by installing and using the Python module PyAutoGUI. While this module is powerful in its own right, when used in conjunction with various other modules, anything can be automated. As programmers, UI testing is the first thing that comes to mind. For our purposes here, we will restrict ourselves to a very simple application, one that solves a gripe I have with Slack.&lt;/p&gt;

&lt;p&gt;Now Slack is a godsend for more reasons than one. However, I find the way Slack handles status quite bothersome. I step away from my computer often during the workday. Give Slack 10 minutes and it changes my status to away. I am, however, very much available as I have my mobile phone on me. If I were to step away to take a break, I already have the ability to change my status to indicate so. We can write a simple program using PyAutoGUI to work around this issue.&lt;/p&gt;

&lt;p&gt;PyAutoGUI is a Python automation module used to simulate a click, key press, scroll, etc. These actions can be combined in any order and in conjunction with other Python modules, they can detect and react to just about any change in the GUI of the Operating System. For instance, the dinosaur mini-game bundled with Google Chrome can be completely automated just using PyAutoGUI as it’s all about detecting change and reacting to it with key presses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python - i_am_never_away&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Dependencies:&lt;/em&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python3&lt;/li&gt;
&lt;li&gt;Modules: PyAutoGUI and Time&lt;/li&gt;
&lt;li&gt;Basic understanding of Python syntax&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;br&gt;
Windows: &lt;br&gt;
pip install pyautogui&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Linux and Mac:&lt;/em&gt;&lt;br&gt;
pip3 install pyautogui&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Some known issues:&lt;/em&gt;&lt;br&gt;
If you are running OSX El Capitan and have problems installing pyobjc, try:&lt;br&gt;
MACOSX_DEPLOYMENT_TARGET=10.11 pip install pyobjc&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Linux additionally requires:&lt;/em&gt;&lt;br&gt;
sudo apt-get install scrot &lt;br&gt;
sudo apt-get install python3-tk&lt;br&gt;
sudo apt-get install python3-dev&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;br&gt;
For an easy to read and summarized document on the module and its syntax, please refer to: &lt;a href="https://www.youngwonks.com/resources/pyautogui-cheatsheet"&gt;https://www.youngwonks.com/resources/pyautogui-cheatsheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step I - Importing the Required Modules&lt;/strong&gt;&lt;br&gt;
We start by importing PyAutoGUI and time.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--juAUTHCP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9vzlq2gzkqmatzjwhjm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--juAUTHCP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9vzlq2gzkqmatzjwhjm.png" alt="Image description" width="880" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step II - Making the Program Dynamic&lt;/strong&gt;&lt;br&gt;
The program has to work for any machine with well, Slack installed, irrespective of the display resolution. Therefore, in order to make the program dynamic, we must first obtain the display’s  resolution.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QufVTaB1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tk5mva0b0sxv34nyng0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QufVTaB1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tk5mva0b0sxv34nyng0p.png" alt="Image description" width="880" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step III - Clicking the Start Button&lt;/strong&gt;&lt;br&gt;
While we can simply press the left Windows key on the keyboard to summon the start menu, it’s  not always reliable, especially when coupled with other key inputs due to conflicts between key- press time intervals and the amount of time it takes for the start menu to appear and be ready to detect key presses. Considering the start button is always on the bottom-left corner, we can simply click it.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ratye3rO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8doj04jyss9tess6f8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ratye3rO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8doj04jyss9tess6f8l.png" alt="Image description" width="880" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step IV - Opening Slack&lt;/strong&gt;&lt;br&gt;
Now that we have the start menu up, we can type Slack and hit enter on the keyboard. This is guaranteed to open Slack as among search results, installed applications have the highest precedence. In order to quicken this process, the interval has been set to 0.1s.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SfhMYecK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2y9cgfjcima12ft8z49l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SfhMYecK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2y9cgfjcima12ft8z49l.png" alt="Image description" width="880" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step V - Clicking on the Screen&lt;/strong&gt;&lt;br&gt;
A simple click anywhere within the Slack window should now ensure that the status is changed to available. In order to avoid mis-clicks, we'll click right smack at the center of the screen.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vNRcjxoq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4530k7dt6alkddyenuy6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vNRcjxoq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4530k7dt6alkddyenuy6.png" alt="Image description" width="880" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step VI - Closing Slack&lt;/strong&gt;&lt;br&gt;
With the status now changed, we can close the Slack window. Triggering hotkeys&lt;br&gt;
straightforwardly would’ve been rather tedious, as the correct combination of key press and key release has to be simulated in the right order. Luckily, PyAutoGUI provides an easier alternative, the hotkey() function.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a3Say4I5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/il22o46d16620lcvdmhb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a3Say4I5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/il22o46d16620lcvdmhb.png" alt="Image description" width="880" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step VII - Adding a Timer&lt;/strong&gt;&lt;br&gt;
Finally, we make the program repeat this same process every 10 minutes. There are many ways to keep track of elapsing time. The easiest, however, is using the time module, more specifically, the time.time() function. We simply note down the current time at the beginning of the program and keep subtracting from it to determine elapsed time. If this happens to be a multiple of 600, it means 10 minutes or a multiple of 10 minutes has passed and each time it does, Slack is opened.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6FUHBQ-M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29hcx8ys0zi8cjuy2kj1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6FUHBQ-M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29hcx8ys0zi8cjuy2kj1.png" alt="Image description" width="880" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the official documentation, please refer to: &lt;a href="https://pyautogui.readthedocs.io/en/latest"&gt;https://pyautogui.readthedocs.io/en/latest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
GUI Automation, in all its essence, is in line with the very spirit of programming languages; it enables us to escape the mundanity of repetitive tasks by pawning it off to not-so-smart, smart computers by letting us communicate with them. The only difference here is the level of abstraction. This variant of computer automation is very surface-level and as a result, very easy to understand. The potential, however, is boundless.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article has been written by Shravan Sridhar. He has worked in the fields of Cyber Security and Data Science, and is currently an experienced Python instructor at YoungWonks (&lt;a href="https://www.youngwonks.com"&gt;https://www.youngwonks.com&lt;/a&gt;), a top after-school coding program for kids and teens. YoungWonks' WASC-accredited program offers kids a world-class introduction to Python. Students here get started with real syntactical computer programming and gain conceptual depth of a college level program with a kid-friendly curriculum.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>pyautogui</category>
      <category>programming</category>
      <category>automation</category>
    </item>
    <item>
      <title>5 Ways to Reverse a String using Python</title>
      <dc:creator>YoungWonks</dc:creator>
      <pubDate>Fri, 04 Jun 2021 06:51:02 +0000</pubDate>
      <link>https://dev.to/youngwonks/5-ways-to-reverse-a-string-using-python-379o</link>
      <guid>https://dev.to/youngwonks/5-ways-to-reverse-a-string-using-python-379o</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WtybI41p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04cdh8l6lcgulubvcect.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WtybI41p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04cdh8l6lcgulubvcect.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A string in programming consists of a sequence of literal characters. We use them extensively in almost every program. Hence, it’s important to know them well and be able to use their features as and when the need arises. Reversing a string is an operation that keeps coming up time and again. Here we will see 5 simple ways to reverse a string in Python3. &lt;/p&gt;

&lt;h1&gt;
  
  
  Reverse Indexing
&lt;/h1&gt;

&lt;p&gt;This is a method that is simple but not logical to deduce. It utilizes the start-stop-step indexing on a string to produce the reversed string.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3aCi1XPq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/junycuyp31428tkuseui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3aCi1XPq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/junycuyp31428tkuseui.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Using Lists
&lt;/h1&gt;

&lt;p&gt;I use this method often. This helps when there are modifications to be made prior to producing a reversed list. Here we convert the string to a list, then use the inbuilt reverse method of the list and join it back into a string.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yzBSQLpm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/svqoia2linf50c3low93.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yzBSQLpm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/svqoia2linf50c3low93.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Reverse Iteration
&lt;/h1&gt;

&lt;p&gt;This is an approach where we step through the string one by one and keep appending the characters to the end of an empty string. At the end, we get a string that is the reverse of our original string.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o27hvO9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uya6s62fogsglu6nm4ts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o27hvO9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uya6s62fogsglu6nm4ts.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Using the Reversed Function
&lt;/h1&gt;

&lt;p&gt;This reversed function is a built-in function in Python3 that allows us to reverse any sequence that is provided. It mainly accesses the sequence in the reverse order. The reversed functions work not only for a string but also for lists, tuples etc.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nttx2zRO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9v0etl1w79abp6sdgj9b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nttx2zRO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9v0etl1w79abp6sdgj9b.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Using Indexing
&lt;/h1&gt;

&lt;p&gt;This is an approach we really need to know as it is the only way we can implement this in other languages like C and C++ etc. Here we just use a loop to iterate from the end to the beginning while appending the characters to an empty string.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uMR4BK7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jagzdeiwb7gje7f88748.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uMR4BK7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jagzdeiwb7gje7f88748.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This article has been written by Suchin Ravi. Suchin is an experienced educator and technologist. Suchin teaches computer science at YoungWonks &lt;a href="https://www.youngwonks.com"&gt;https://www.youngwonks.com&lt;/a&gt; and works as a lead software developer on many projects at Wonksknow &lt;a href="https://www.wonksknow.com/"&gt;https://www.wonksknow.com/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>computerscience</category>
      <category>codenewbie</category>
      <category>onlinecoding</category>
    </item>
    <item>
      <title>How to hash passwords with Python </title>
      <dc:creator>YoungWonks</dc:creator>
      <pubDate>Wed, 19 May 2021 06:59:32 +0000</pubDate>
      <link>https://dev.to/youngwonks/how-to-hash-passwords-with-python-4m78</link>
      <guid>https://dev.to/youngwonks/how-to-hash-passwords-with-python-4m78</guid>
      <description>&lt;p&gt;If you are a web developer working on creating a website, you will need to look into the safe storage of passwords for the site. How can one go about doing this? The answer lies in hashing and verification of passwords. &lt;/p&gt;

&lt;p&gt;In this blog, we shall look at how one can hash passwords with Python. But before that, let us take a quick look at what is hashing. Hashing refers to the process of converting a given key into another value. A hash function is used to generate the new value as per a mathematical algorithm. The result of a hash function is known as a hash value or simply, a hash. &lt;/p&gt;

&lt;p&gt;In Python, hashing can be carried out using Passlib. It is a password hashing library for Python 2 &amp;amp; 3, which offers cross-platform implementations of over 30 password hashing algorithms, and a framework for managing existing password hashes.&lt;/p&gt;

&lt;p&gt;Now let us look at the steps involved in hashing passwords in Python. &lt;/p&gt;

&lt;p&gt;Step 1: Install and import&lt;br&gt;
We install Passlib first by typing pip3 install passlib in the terminal.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TK4MSCKk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sc765lpd13ob2mwn9wdu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TK4MSCKk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sc765lpd13ob2mwn9wdu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After this, we import a hashing algorithm by typing the code as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sUBWrnzK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbbv9c6yz8ywrsppdf2q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sUBWrnzK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbbv9c6yz8ywrsppdf2q.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2: Syntax &lt;br&gt;
In this stage, we generate a new hash from the string and verify the password as shown below.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5w6G5iEu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipj56821jgdbx8uylfer.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5w6G5iEu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ipj56821jgdbx8uylfer.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let us look at how this can be done in an example. First, the user would need to create an account. We would then ask the user for their email and password. After this, we hash the password and store it (maybe in a database). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cJd79AvR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m56hinyzk1kt1wt3b4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cJd79AvR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m56hinyzk1kt1wt3b4z.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the user needs to access the account later, we hash what we stored against the hash of the entered password. Upon successful verification, the user can access the account.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d4FKJ8xP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0385pvha8e0r8bgcx4lm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d4FKJ8xP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0385pvha8e0r8bgcx4lm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you have successfully hashed and verified a password in Python. &lt;br&gt;
However, there are other algorithms one can use in addition to the one we have shared above. You can see them below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ar6DyVTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x25pvqbq4xpmpz37szo1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ar6DyVTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x25pvqbq4xpmpz37szo1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article has been written by Suchin Ravi. Suchin is an experienced educator and technologist. Suchin teaches computer science at YoungWonks &lt;a href="https://www.youngwonks.com"&gt;https://www.youngwonks.com&lt;/a&gt; and works as a lead software developer on many projects at Wonksknow &lt;a href="https://www.wonksknow.com/"&gt;https://www.wonksknow.com/&lt;/a&gt;. &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
