Add more list peephole idioms (#48268)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/48268
Test Plan: Imported from OSS
Reviewed By: jamesr66a
Differential Revision: D25104617
Pulled By: eellison
fbshipit-source-id: b41c03d5da6e9b88acf21a859f61c5c70608c150