thu removing an item we can remove an existing node using the key for that node in the below programwe locate the previous node of the node which is to be deleted thenpoint the next pointer of this node to the next node of the node to be deleted class nodedef __init__(selfdata=none)self data data self next none class slinkedlistdef __init__(self)self head none def atbegining(selfdata_in)newnode node(data_innewnode next self head self head newnode function to remove node def removenode(selfremovekey)headval self head if (headval is not none)if (headval data =removekey)self head headval next headval none return while (headval is not none)if headval data =removekeybreak prev headval headval headval next