Edinson Cavani converted a penalty to earn the win.
Mazzarri said: "Last year the Champions League made us drop a few Serie A points, but that experience helped us to grow. Now we are less careless and sluggish, while we also improved on set plays.
"We want to go forward in the Europa League and try not to let it affect our domestic form as well. Great teams must know how to suffer and hit at the right moment.
"I studied Juventus and learned that they never get distracted, play games without leaving any space to their opponents and play consistently."