Why isn't my code working ? Big latin using python
Here's my code : sen = input() words = sen.split() b = [] for i in range (len(words)): first_letter = words[i][0] sans_one = words[i].replace(words[i][0],"") if first_letter in ["a","e","u","i"] : big_latin = f"{sans_one }way" else : big_latin = f"{sans_one }{first_letter}ay" b=b+[big_latin] print (' '.join(word for word in b)) . . . . . . . . . . Instructions : You have two friends who are speaking Pig Latin to each other! Pig Latin is the same words in the same order except that you take the first letter of each word and put it on the end, then you add 'ay' to the end of that. ("road" = "oadray") Task Your task is to take a sentence in English and turn it into the same sentence in Pig Latin! Input Format A string of the sentence in English that you need to translate into Pig Latin. (no punctuation or capitalization) Output Format A string of the same sentence in Pig Latin. Sample Input "nevermind youve got them" Sample Output "evermindnay ouveyay otgay hemtay"