824-Goat-Latin
Fri 14 November 2025
https://leetcode.com/problems/goat-latin
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def toGoatLatin(self, S: str) -> str:
ans = ''
vowels = 'aeiouAEIOU'
words = S.split()
i = 1
for word in words:
if i > 1:
ans += ' '
if word[0] in vowels:
ans += word …Category: leetcode
Read More