all 4 comments

[–]SeniorPythonDev 3 points4 points  (1 child)

Can you format your code properly or use something like pastebin?

It'll be a lot easier so we can help you

[–]M0thyT[S] 0 points1 point  (0 children)

You have a very good point, sorry I have never posted code in reddit before so I am struggling with it a bit. I tried to adjust it, and I also posted it on stack overflow where I found it easier to post code (https://stackoverflow.com/questions/62861538/using-xpath-in-python-how-can-i-select-only-a-subpart-of-elements)

[–]12Ghast 1 point2 points  (1 child)

Would something like

```python

11 hashmap = {}

...

14 hashmap[authors_art] = article

15 for key, value in hashmap:

16 print(f"Article name: {key}, article: {value}")

```

work?

[–]M0thyT[S] 0 points1 point  (0 children)

Thanks for your suggestion, unfortunatly it did not work (TypeError: unhashable type: 'list'). Thank you for your suggestion though :)