I created a thread as I was struggling with an assignment I was given. I was told today that I mustn't share my coding with anyone and was wondering if there was anyway to delete my thread.

my thread is
http://www.daniweb.com/software-development/python/threads/465305/python-prime-number-code-not-working

I understnad deleting threads is not meant to happen. So would it be possible to edit out parts of my code, so only the problem is visible?

Press Flag Bad Post button on your post and tell a moderator what you want edited.

So would it be possible to edit out parts of my code, so only the problem is visible?

If the removal doesn't affect the question nor the answers, the request is likely to be honoured.

The code looks a pretty embedded part of that question though including quoted parts of it in responses and a follow up question also based off further code blocks.

Deleting these would make the thread almost impossible to follow imho