Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Linked Lists in python
#python 3.5.2 class Node: def __init__(self,data): self.data = data self.next = None class linkedLists: def __init__(self): self.head = None def append(self,data): node = Node(data) if(self.head == None): self.head = node return end = self.head while(end.next): end = end.next end.next = node return def print_llists(self): temp = self.head while(temp): print(temp.data,'--> ',end='') temp = temp.next if __name__== '__main__': llist = linkedLists() llist.append(5) llist.append(4) llist.append(3) llist.append(2) llist.append(1) llist.print_llists()
run
|
edit
|
history
|
help
0
snake water gun correct
abstract base class
gj3
PyQueue
wordchangething
Student
unhex 16 bit word python (string to hex)
permutations example
Lesson 5 part b
Circular loop for week.