There are two things that make me very happy about this question. The first is, someone gave you code that apparently works, and you want to understand it more. That's a very good sign that you'll learn a lot from the site.
The second is, And he already did so much so I didn't ask him for an explanation. - you're also considerate, which is also a good sign that you'll do well on the site. But, don't be too shy to ask people to explain something about their answer, most on the site would just be delighted that you really want to learn.
You can post the code and ask for clarification, but you need to do the following:
Link to the answer you received (e.g. Someone provided this answer to my question about (something), it works, but I don't understand why it works.
Talk through the code to the point that you understand it. E.g. "I understand everything up to the line where it says 'unicorns'"
Tell folks exactly what you don't understand. Is it an operand or an operation (e.g bitwise op)
You can even go on to ask if there's a perhaps slightly less efficient, but simpler to comprehend way to accomplish the same thing
Just make it clear that you got code, it works, and you'd be delighted to know why it works. We don't see ... as many with natural curiosity ... as we'd like to these days.
If you run into trouble point to this meta post. English is obviously a bit of a challenge for you still, but I think you'll do fine if you spend a bit of time composing the question.