link_lists
refers to a new dictionary on each iteration. You could exclude it: put all_lists = []
before the for x in range(m_num)
loop. And replace the last 3 line in the loop with: all_lists.append([link.get("title") for link in links])
Note: you don't need to know m_num
in this case:
all_lists = []
for name in iter(lambda: input("monster name"), ""): # loop until empty name
# ...
titles = [link["title"] for link in content.findAll('a', title=True)]
all_lists.append(titles)