#Take the users input words = raw_input("Enter some text to translate to pig latin: ") print "You entered: ", words #Now I need to break apart the words into a list words = words.split(' ') #Now words is a list, so I can manipulate each one usinga loop for i in words: if len(i) >= 3: #I only want to translate words greater than 3 characters i = i + "%say" % (i[0]) i = i[1:] print i else: pass
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question