AS
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)