+ 1
I didn't understand line 4 in the code
2 Answers
+ 2
getting all text before @ from email and adding "@ + newdomain"
hope it helps..
+ 2
basically it uses the index (the variable created on line 3) to keep the first half of the email (the part that comes before the '@') and then replaces the second half with the new domain that was passed in as an argument to the function
edit: I realise that the index section may have caused some confusion - the [:index] just refers to anything before the '@'