The problem of list algorithm in python

["/N/98445.html", "/N/98439.html", "/HomeV2/Banner/Records?model=A1&name=A1&url=https%3A%2F%2Fwww.jiemodui.com%2FKe%2F97539.html%3Ffrom%3Djmd004&flag=3a6f8321cf5ca56b13fd4a40a9474246", "/N/98441.html", "/N/98436.html", "/N/98435.html", "/N/98433.html", "/N/98434.html", "/HomeV2/Banner/Records?model=A3&name=A3&url=https%3A%2F%2Fwww.jiemodui.com%2FA%2F98137%3F%3Dxxl3&flag=90e994d56cd13c6b3201012bc988873a", "/N/98432.html", "/N/98431.html", "/N/98430.html", "/N/98429.html", "/N/98427.html", "/N/98426.html", "/N/98421.html", "/N/98416.html", "/N/98420.html", "/N/98407.html", "/N/98419.html", "/N/98411.html", "/N/98406.html"]

here I want to keep the format similar to / N/98445.html and remove the long / HomeV2 from the list. What I can think of is to encounter the string pass and reconstruct a list to add, because it is possible that the string with / HomeV2 is not in this position
there is no need to reconstruct a list to delete these two long strings with / HomeV2 directly from the original list

.
Mar.30,2021

Python has a function called filter (), which is used to customize Filter to drop some elements

.
Menu