I’m trying to work on a pig latin type setup. The rule for consonant is to take the first letter of the string, move it to the end and add ay. My problem is that I’m deleting the first letter and moving it to the end…I’m not sure how to do this at the same time. Thank you.
pyg = 'ay'
original = raw_input('Enter a word:')
word = original.`enter code here`lower()
first = original[0]
if len(original) > 0 and original.isalpha():
if first == "a" or "e" or "i" or "o" or "u" or "A" or "E" or "I" or "O" or "U":
print("vowel")
new_word = original.append(pyg)
else:
print("consonant")
new_word = (word.pop[0] and word.append(word[0]) + str(pyg)
print original
else:
print 'empty'
Like this?