Q: separating a line into two in python I have to make a code that splits the username by the domain.
ex.
Input: abc@xyz.com
Output: Your username is abc.
        Your domain is xyz.com.
The outcome is suppose to by in two different lines but i can't seem to get that...
def username2(email):
    z=(email.split('@'))
    x='Your username is'+ ' ' + z[0]
    y='Your domain is' + ' ' + z[1]
    return x+'. '+y+'.'

Sorry.. I'm really noob.

A: You need to insert a newline character into your result:
return x + '. \n' + y + '.'

You could also use string formatting:
username, domain = email.split('@')

return 'Your username is {}.\nYour domain is {}.'.format(username, domain)


A: Escape codes are what you're looking for
print "first line \nSecond Line"
http://docs.python.org/2/reference/lexical_analysis.html#literals

A: Python3
def username2(email):
    username, domain = email.split('@')
    print('Your username is {}'.format(username))
    print('Your domain is {}'.format(domain))

Python2
def username2(email):
    username, domain = email.split('@')
    print 'Your username is %s' % username
    print 'Your domain is %s' % domain

