I have a string variable which have integer value and pick all integer value from list or string

EXAMPLE

```
a = 'This is user code 8466823 and passkey is 1258746'
sample = "1234567890"
b = []
for i in a:
    if i in sample:
        b.append(i.replace(" ", "\n"))

b = "".join(b)
print(b)

```

output like this `84668231258746` but Expect like this `8466823` and `1258746` in next or in seperate line