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: 
With your approach, you need to reset the iterator over `y` each time you try a new value in `x`.

It might be clearer like this:

```
for i in x:
  if i in dic:
    text.append(i)
  else:
    for j in y:
      concatenated = i + j
      if concatenated in dic:
        text.append(concatenated)

```

The `for j in y` tries all the things in `y`, otherwise it moves on each time, and never looks back.
Here's a straightforward version with nothing fancy. Others have suggested options that are likely more efficient; however, I think this solution captures your desired solution better than some (e.g., by checking all variations of concatenations).

You will want to use sets if you're doing a lot of lookups.

```
x = ['casa','lo','pre','computer']
y = ['music','sun','ve','sident','house']
dic = set(['sunday','love','president','house','computer'])
in_dic = set()
for str in y:
    if str in dic:
        in_dic.add(str)
for str1 in x:
    if str1 in dic:
        in_dic.add(str1)
    for str2 in y:
        str3 = str1 + str2
        str4 = str2 + str1
        if str3 in dic:
            in_dic.add(str3)
        if str4 in dic:
            in_dic.add(str4)

print(list(in_dic))
['president', 'love', 'computer', 'house']

```