A cleaner at the Myer department store in Melbourne's CBD has had a lucky escape after he was bitten on the finger by one of the world's deadliest snakes, which remains on the loose in the city.

The 29-year old man was throwing rubbish in a dumpster in a laneway outside the Lonsdale Street store when he felt something sharp on his finger.

He pulled out his hand and found a snake about 20 centimetres long dangling from his finger, said Ambulance Victoria spokesman Paul Bentley.

The man was taken to St Vincent's Hospital, where a swab test confirmed he had been bitten by a brown snake, one of the deadliest snakes in the world and the leading cause of snakebite deaths in Australia.