thespeedracer38

Pig Latin

Sep 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. def convertToPigLatin(string:str) -> str:
  2.     '''
  3.        Convert string to pig latin
  4.    '''
  5.     vowels = "aeiou"
  6.     if string[0].lower() in vowels:
  7.         string = string + "ay"
  8.     else:
  9.         string = string[1:] + string[0] + "ay"
  10.     return string
Add Comment
Please, Sign In to add comment