An Email Slicer is just a tool that will take an email id as an input and will perform slicing operations on it to return the username and the domain.
Hello everyone, today we will build an Email Slicer in Python.
An Email Slicer is just a tool which will take an email id as an input and will perform slicing operations on it to return the username and the domain of the email id.
Your username is rishabh.singh & domain is gmail.com
Here we returned rishabh.singh as username and gmail.com as a domain.
This project is super simple and quick and it doesn't require any setup so let's quickly jump to coding and build this.
So this first we are going to do is to ask the user to enter the email to be sliced.
email = input("Enter Your Email: ").strip()
Here, as usual, we are making use of the input() function to get the input from the user in the form of string. We will store this input in the email variable.
Also notice that we are making use of a strip() function. strip() function will remove any additional & unwanted spacing on both sides of strings. So that we can make sure that we have only the email in the input and not any unwanted spaces.
Python Programming Tutorials For Beginners
Guide to Python Programming Language
Python Hello World Program - Your first step towards Python world. Learn how to create the Hello World Python program in PyCharm.
In this tutorial, you’re going to learn a variety of Python tricks that you can use to write your Python code in a more readable and efficient way like a pro.
Today you're going to learn how to use Python programming in a way that can ultimately save a lot of space on your drive by removing all the duplicates. We gonna use Python OS remove( ) method to remove the duplicates on our drive. Well, that's simple you just call remove ( ) with a parameter of the name of the file you wanna remove done.