PYTHON: Pig Latin

PYTHON: Pig Latin Program

I am going to show the solution code for my clash of code: "Igpay Latin". It is suitable for use in any Pig Latin case.

Program: Pig Latin

In this program we will:

  1. Get an input sentence from the user and create a variable string.
  2. Define a function that implements "Pig-Latin" on a string.
  3. Parse through the sentence and add each word to an array.
  4. Iterate through each word in the array and use the function on that word.
  5. Output the resulting string, now in pig-latin and in lowercase, and end the program.

Let's do this:


This program will work for single-word strings or mulitple-word strings.

Please feel free to use it or to modify it to suit your needs.

Here are two links for those who'd want to read about Pig Latin:

Happy Coding, @Code-Parser

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to