I have a string (down below) and I am asked to write code so it only prints out the name
s = "jimmy.clancy5@mail.ucd.ie"
output =" Jimmy Clancy"
my code below splits the string into tokens
the first name is correct but for the second it also prints 5@mail
I'm not exactly sure how to remove it
import sys
input = sys.stdin.readlines()
for name in input:
name = name.strip().split(".")
second_name = name[1]