Modernize Python 2 code to get ready for Python 3

This commit is contained in:
cclauss
2017-11-25 10:23:50 +01:00
parent a03b2eafc0
commit 4e06949072
95 changed files with 580 additions and 521 deletions

View File

@ -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()