joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.63k stars 4.5k forks source link

Invalid Syntax at line: 82 #55

Open andreoliveirapguerra opened 6 years ago

andreoliveirapguerra commented 6 years ago

Problem

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

felix4webscience commented 5 years ago

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...

PETOLI commented 5 years ago

@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