import re email = "firstname.lastname@gmail.com";m = re.match(r'^([^\s@.]+)\.([^\s@.]+)@([^\s@]+)$', email)if m: print(m.groups())
Standard input is empty
('firstname', 'lastname', 'gmail.com')
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!