mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 02:38:12 +08:00
Modernize Python 2 code to get ready for Python 3
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from __future__ import print_function
|
||||
# Author: OMKAR PATHAK
|
||||
|
||||
# We can use Python's dictionary for constructing the graph
|
||||
@ -15,7 +16,7 @@ class AdjacencyList(object):
|
||||
|
||||
def printList(self):
|
||||
for i in self.List:
|
||||
print(i,'->',' -> '.join([str(j) for j in self.List[i]]))
|
||||
print((i,'->',' -> '.join([str(j) for j in self.List[i]])))
|
||||
|
||||
if __name__ == '__main__':
|
||||
al = AdjacencyList()
|
||||
|
Reference in New Issue
Block a user