asaini / Apriori

Python Implementation of Apriori Algorithm for finding Frequent sets and Association Rules
MIT License
771 stars 435 forks source link

Invalid syntax: `key=lambda (item,` #22

Closed jacolind closed 6 years ago

jacolind commented 6 years ago

I ran this inside my jupyter notebook and got the following error

Title "<ipython-input-303-3f4dffe6b184>", line 118
    for item, support in sorted(items, key=lambda (item, support): support):
                                                 ^
SyntaxError: invalid syntax
AnthonyNTK commented 6 years ago

Run the script with python 2.7 or you can use python2to3.exe to convert the script to be python3 compatible. Jupyter is using 3.6 or higher