Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Python, finditer(), filter emails and place put in tuple
#python 3.5.2 import re def getEmails(str): regex = r'([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+){0,}' emails = tuple(m.group(0) for m in re.finditer(regex, str) if m.group(0)) return emails str = "hello@gmail.com;aaaa@yahoo.com no@yes.de, why@hotmail.com" print(getEmails(str))
run
|
edit
|
history
|
help
0
Linear search
self
Guessing game
Primes finding algorithm
Подарки
denemeler
shivareddy correct
Python. Even
BUCLE FOR EN PYTHON 3
string without space into list