You are modifying word but not saving the changes. Try
import string
def pig_it(text):
pig = []
for word in text.split():
if word not in string.punctuation:
pig.append(word[1:] + word[0] + 'ay')
return ' '.join(pig)
pyg_latin = pig_it("The train is fast !")
print(pyg_latin)