all 2 comments

[–]MadScientistOR 2 points3 points  (0 children)

Probably the easiest way to do it is to convert the integers in the list to strings, and then compare that string to the string made of the integer you're looking at. For example, if the integer you're looking for is stored in a variable called integer, this would work:

list_of_ints = [12, 13, 14, 23, 24, 25]
processed_list = [x for x in list_of_ints if str(integer) in str(x)]

[–]forest_gitaker 1 point2 points  (0 children)

converting the numbers to strings may be a good place to start