traversing linked list singly linked lists can be traversed in only forward direction starting form the first data element we simply print the value of the next data element by assigning the pointer of the next node to the current data element class nodedef __init__(selfdataval=none)self dataval dataval self nextval none class slinkedlistdef __init__(self)self headval none def listprint(self)printval self headval while printval is not noneprint (printval datavalprintval printval nextval list slinkedlist(list headval node("mon" node("tue" node("wed"link first node to second node list headval nextval link second node to third node nextval list listprint(when the above code is executedit produces the following resultmon tue wed