mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-18 18:14:34 +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
|
||||
import pprint, time
|
||||
|
||||
def getWordPattern(word):
|
||||
@ -32,7 +33,7 @@ def main():
|
||||
fo.write(pprint.pformat(allPatterns))
|
||||
|
||||
totalTime = round(time.time() - startTime, 2)
|
||||
print('Done! [', totalTime, 'seconds ]')
|
||||
print(('Done! [', totalTime, 'seconds ]'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Reference in New Issue
Block a user