I know the question sounds a little tricky or not really clear but I need a program, which would separate names. Since I am not from an English speaking country, our names either end in s (for males) or in e and a (for girls)
How do I make Python separate words by their last letter? I guess this would explain more.
Like there are three names: "Jonas", "Giedre", "Anastasija".
And I need the program to print out like this
MALE: Jonas
FEMALE: Anastasija, Giedre
I started up the program and so far I have this:
mname = []
fname = []
name = input("Enter a name: ")
That's really all I can understand. Because I'm not familiar with how to work the if
function with the last letter.