Reputation: 1
code is:
cat_list = [k for k, v in cat_counter.()[:50]]
Error is as follows:
File "", line 1 cat_list = [k for k, v in cat_counter.()[:50]]
SyntaxError: invalid syntax
Upvotes: 0
Views: 892
Reputation: 29
The cat_counter
function would be defined like this:
def cat_counter():
# Make function
Thus, simply remove the dot to properly call the function:
cat_list = [k for k, v in cat_counter()[:50]]
Upvotes: 1