You should not discuss politics with friends.
You should however discuss politics with close friends -- they probably got close to you because you both share a worldview or they like hearing your worldview (even if it differs from yours).
Closeness means more sharing. That always comes with risks and rewards.