---
title: "Anubhav Singh (@arthuragnar) | Hashnode"
description: "Anubhav Singh (@arthuragnar) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@arthuragnar"
---

@arthuragnar

# Anubhav Singh

@arthuragnar · Joined October 2020

## Comments

[Abhishek Mani TripathiI think you are using python2.7, instead of input() us raw\_input() and perform other operation. Here goes the code: email = raw\_input("What is your email address?: ").strip() user\_name = email\[:email.index("@")\] domain\_name = email\[email.index("@")+1:\] res = "Your username is '{}' and your domain name is '{}'".format(user\_name,domain\_name)](https://hashnode.com/posts/email-slicer-with-python/5f87ecbd32eeca54569a35dd/comment/5f87fb2332eeca54569a375a#reply-5f8816af4aeeb354354ed3a6)

Reply · Article · Oct 15, 2020 · [Email Slicer with Python](https://hashnode.com/posts/email-slicer-with-python/5f87ecbd32eeca54569a35dd)

[Hi Abhishek can you please share the whole code you have written from the above code it looks like you have not defined some variable.](https://hashnode.com/posts/email-slicer-with-python/5f87ecbd32eeca54569a35dd/comment/5f87fb2332eeca54569a375a#reply-5f8804f04aeeb354354ed2c2)

Reply · Article · Oct 15, 2020 · [Email Slicer with Python](https://hashnode.com/posts/email-slicer-with-python/5f87ecbd32eeca54569a35dd)
