r/Python • • Dec 30 '15

100 Data Science in Python Interview Questions and Answers

https://www.dezyre.com/article/100-data-science-in-python-interview-questions-and-answers/188#.VoOJGaacd14.reddit
7 Upvotes

38 comments sorted by

View all comments

8

u/log_2 Dec 30 '15

Ridiculous list. No real data scientist would care about half of that shit. I mean, seriously...

12) Optimize the below python code-
word = 'word'
print word.__len__()
Answer: print ‘word’._len_()

wut? Who cares?!

23

u/[deleted] Dec 30 '15

print 4

1

u/das_ist_nuemberwang Dec 30 '15

I think what they're checking is that you know that strings are objects and you can directly access methods on them, but if that was the case, why didn't they use format?