Generating Dinosaur names with Tensorflow RNN
Check out this answer: 

https://stackoverflow.com/a/60230236/12642230

Alternative Solution:

Tensorflow provides a method pad_sequences() to do that:

https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/sequence/pad_sequences

The default value of padding is 'pre', you might wanna change that to 'post' to do what you want, along with providing the maximum length, which is 26 in your case. You also would need to add a special padding character to you dictionary of characters to indices, and use its index to provide padding value for the method.