I'm trying to figure out how to write a code that would allow me to get all the possible combination. In this case, I have 4 fruits: apple, orange, grape, mango. I want to know all the possible combination, for example:

apple (a possible combination)
apple,orange (another possible combination)
apple,grape (another possible combination)
apple,orange,grape (another possible combination)
and so on...