mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 05:21:09 +00:00
Modernize Python 2 code to get ready for Python 3
This commit is contained in:
parent
e31c780d94
commit
ad6b0f1c6b
|
@ -187,8 +187,8 @@ def adjm():
|
|||
"""
|
||||
|
||||
|
||||
def floy(xxx_todo_changeme):
|
||||
(A, n) = xxx_todo_changeme
|
||||
def floy(A_and_n):
|
||||
(A, n) = A_and_n
|
||||
dist = list(A)
|
||||
path = [[0] * n for i in xrange(n)]
|
||||
for k in xrange(n):
|
||||
|
@ -259,9 +259,9 @@ def edglist():
|
|||
"""
|
||||
|
||||
|
||||
def krusk(xxx_todo_changeme1):
|
||||
def krusk(E_and_n):
|
||||
# Sort edges on the basis of distance
|
||||
(E, n) = xxx_todo_changeme1
|
||||
(E, n) = E_and_n
|
||||
E.sort(reverse=True, key=lambda x: x[2])
|
||||
s = [set([i]) for i in range(1, n + 1)]
|
||||
while True:
|
||||
|
|
Loading…
Reference in New Issue
Block a user