Mark Wahlberg has revealed how he went back to school for The Gambler.

The Transformers star admitted he attended university lectures to prepare for his role as a literature professor with a gambling addiction in Rupert Wyatt’s crime drama.

“Playing a professor in college was a bit of a stretch but something that I was excited about. I just fell in love with playing a part like this. It’s not like something I’ve done in the past,” the actor explained.

“I’m not one to shy away from a challenge – I usually jump at the opportunity to do something different and unexpected. But I’m also the kind of guy to make sure I’m prepared and to cover all the basis. I don’t want to look foolish and I certainly don’t want to look unprepared.”

Mark Wahlberg and Brie Larson star in The Gambler
Mark Wahlberg and Gambler co-star Brie Larson (Charles Sykes/Invision/AP)

Mark continued: “The first thing that I wanted to do is spend as much time with literary professors as possible. We sent up a reading of the screenplay back in August 2013, with the head of the English department from the University of Michigan.

“I read the script aloud twice a day, every day for seven months. I went to lectures, sitting in on different classrooms.”

The 43-year-old star took some tips from his first-hand experiences.

He said: “I remember sitting in on a lot of lectures and thinking I can see why a lot of them are shopping on the internet and looking up different things. Very few people were taking notes, and not as interested and not as exciting and intriguing as we wanted to make it.”

The Gambler is out on Blu-ray and DVD on June 1.