You are viewing a single comment's thread. Return to all comments →
Can anyone tell me what's wrong with my Python code
def insertNodeAtPosition(llist, data, position): i = 0 while llist: if i != position: print(llist.data, end=" ") llist = llist.next i += 1 else: print(data, end=" ") i += 1
Insert a node at a specific position in a linked list
You are viewing a single comment's thread. Return to all comments →
Can anyone tell me what's wrong with my Python code