No doubt playing a serial killer could really mess with one’s psyche. Just ask Tahar Rahim.

The actor portrays real-life 1970s French murderer Charles Sobhraj in Netflix’s eight-episode “The Serpent.” When they first began shooting, he thought he was able to leave the work behind him when he went home at the end of the day. “I needed a workout to let it out, all of this dark energy has to get out of my body, out of myself,” Rahim, 39, tells me on Wednesday’s episode of the “Just for Variety” podcast, adding, “I needed to relax and the only way I found was to work out.”

The cast and creatives were also careful not to over glamorize or sensationalize Sobhraj’s sometimes flamboyant lifestyle or make him too likeable. “I talked with the director, and I was like, ‘Okay, he has to be charming…Otherwise, [his victims] wouldn’t fall into his net,’ ” Rahim says. “And it was like, ‘Yeah, but be careful. What we want is him to be scary and attractive, and mysterious.’ ”

When he first signed for the project, Rahim thought about trying to meet Sobhraj in prison because he assumed he’d try to con him. He wanted to experience his personality first-hand. “But ethically, it was not right, out of respect to the victims and the families,” Rahim explains. “Plus, you know what, Charles Sobhraj, if you want to see him, you got to pay. So above all, I’m going to give him some money? No way.”

Prior to “The Serpent” premiere, Rahim picked up BAFTA and Golden Globe nominations earlier this year for his work as former Guantánamo Bay detainee Mohamedou Ould Slahi opposite Jodie Foster in the political legal drama “The Mauritanian.”

Not long after we talked, it was announced that Rahim will star in screenwriter and director Rebecca Miller’s “She Came to Me” alongside Anne Hathaway, Marisa Tomei, Joanna Kulig and Matthew Broderick. But before that, he was getting to shoot a French musical. “I sing like a cow,” Rahim says, laughing. “I’m working a lot to be ready. But you know, each time I’m scared and I feel like I could fail, excites me. I hope I’ll be fine. Dancing is okay. It’s not that hard because it’s a musical [but] not like the old-fashioned Hollywood way. It’s more a French way, more quiet. That’s okay, I can handle it.”

Listen to the full “Just for Variety” interview with Rahim above, at Apple podcasts or wherever you find your favorite podcasts.