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

@ -12,6 +12,7 @@ Constraints
Note: The tree input will be such that it can always be decomposed into
components containing an even number of nodes.
"""
from __future__ import print_function
# pylint: disable=invalid-name
from collections import defaultdict
@ -66,4 +67,4 @@ if __name__ == '__main__':
tree[u].append(v)
tree[v].append(u)
even_tree()
print len(cuts) - 1
print(len(cuts) - 1)