Police officers were called to Poundland, at 12.25pm on Tuesday, November 6, and asked Daniils Gurilovs if he had anything on him he shouldn’t, said prosecutor Simon Rowe.
He handed over the mamba, and a search of his rucksack uncovered a folding pocket knife.
Ian Pridham, mitigating, said Gurilovs, originally from Latvia, had been in the UK for eight years, and was working in a car wash in Forest Town.
He said Gurilovs had no previous convictions, and there were “no aggravating factors.”
“He didn’t realise how serious it was,” said Mr Pridham.
Probation officer Cheryl Nisbet said: “He tells me he found the knife a week ago and used it at work to cut food.
“He didn’t appreciate how serious it is. He says he would never have used it, but there’s always the potential for it to be used in any kind of confrontation.
“He said he found the mamba in the street and was going to hand it in.”
She added that Gurilovs had been a heroin user for two years and received treatment in Doncaster. He was now taking the heroin substitute Subutex.
“He relapsed the day before and he tested positive for heroin and cocaine,” said Mrs Nisbet.
Mr Pridham warned Gurilovs worked seven days a week and might struggle to keep drug rehabilitation appointments.
Gurilovs, 26, of Wallis Road, Mansfield, admitted possession of the Class B drug and the knife, when he appeared at Mansfield Magistrates Court, on Wednesday.
He was given a 13 week prison sentence, suspended for 12 months, and ordered to attend a six month drug rehabilitation course with ten rehabilitation days.
He must pay £85 costs and a government surcharge of £115.