data-science-from-scratch icon indicating copy to clipboard operation
data-science-from-scratch copied to clipboard

Invalid Syntax at line: 82

Open andreoliveirapguerra opened this issue 7 years ago • 2 comments

Problem

File ".\Friends.py", line 82 print friends_of_friend_ids(users["3"]) # Counter({0: 2, 5: 1})

andreoliveirapguerra avatar Sep 24 '18 18:09 andreoliveirapguerra

Hey, please be more specific. Is your problem related to the content of the book? If, yes please write your version and the language of your book. Please write which IDE and python version you are using e.g. "pycharm", python 3.7 and describe what you expect. Because from that issue above, I am not sure what your questions is about...

felix4webscience avatar Oct 13 '18 12:10 felix4webscience

@JesuisOriginal Not sure if you ever figured this out or care to know, but I am using the most recent version of Anaconda Spyder 3.6.5 (as of 2/28/19). I just assigned users[3] to a variable, then input that variable into the defined function friends_of_friend_ids as such:

userX = users[3] print(friends_of_friend_ids(userX)) #Counter({0: 2, 5: 1}) is the output

PETOLI avatar Feb 28 '19 21:02 PETOLI