How should I deal with variable-length inputs for neural networks?
The most common way people deal with inputs of varying length is padding. 

You first define the desired sequence length, i.e. the input length you want your model yo have. Then any sequences with a shorter length than this are padded either with zeros or with special characters so that they reach the desired length. If an input is larger than your desired length, usually you'd split it into multiple inputs.