I'm quite new to python scripting and work mostly in arcmap. However for my problem ArcMap does nog have a solution. I want to import a raster dataset and than extract from every cell of the raster the value of the 8 neighbour cells als a list / table. I think this is possible by creating a moving window and a list of list. However, because I'm still a dummy python user I wonder if anyone has an elegant usable solution / script for this problem.

If you post your code along with your input and desired output (and a description of how one gets to the other), we can attempt to give you feedback and help you to accomplish your goal. But this is a small forum, and it's unlikely that we'll already have used whatever tool you so you'll need to give us more information than you have in this post.