Cobras are wild animals and not suited to be trained as pets. Moreover, they are known for their aggressive behavior, venomous bites, and defensive attacks, which make them unpredictable and dangerous to handle. While cobras can be captive-bred and raised in captivity, they cannot be "trained" to not attack humans completely. It is important to avoid contact with wild animals and to leave them alone in their natural habitat.