Question: I have created a nodejs express service. When you make it live by running something like `nodemon server.js` then it runs on `your-ip:port-you-listened-on` (`app.listen(3000);`)

**How do I get me nodejs service to run on a host name though?** I need this for my certificate to work. For example, I want it to run on `https://test.mydomain.com`, so a call would be something like `https://test.mydomain.com/login`

Answer: 
IIUC then you can use `itertools.product` to get product of two different lists and then perform set intersection to find the common words

```
from itertools import product
x=['casa','lo','pre','computer']
y=['music','sun','ve','sident','house']
dic=['sunday','love','president','house','computer']
set(list(map(''.join, list(product(x, y)))) + x + y) & set(dic)

```

OUTPUT:

```
{'computer', 'house', 'love', 'president'}

```

If the expected output should not include `house` from second list then do not append list `y` in the final concatenated list

```
set(list(map(''.join, list(product(x, y)))) + x) & set(dic)

```

OUTPUT

```
{'computer', 'love', 'president'}

```
For a one liner use `filter` , `''.join` and add `['']` to the second list (so you don't have to do two `if`s):

```
list(filter(lambda i: i in dic, [''.join((s1, s2)) for s1 in x for s2 in (y + [''])]))
>>['love', 'president', 'computer']

```