What is better, buying a house or investing in mutual funds?

Suppose, you have 50L in your hand and you’ve two options.

  1. To keep all in 50L MF
  2. To buy a flat worth 50L and put it on rent of 17k monthly (this is what most cities offer). The actual rent is 19.5k but you give away 1.5k monthly for the maintenance and security.

Since the purpose is an investment and the only two choices offer a return in the long term. Therefore, I direct my assumption towards the long term, say 15 years.