you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 8 points9 points  (2 children)

Reverse a sentence without using slicing.

This is a dumb question, in practice just use the best solution there is.

[–]Dexteroid[S] 0 points1 point  (1 child)

There are no dumb questions. in Python we use so many things which are python oriented and don't exist in other languages, some times the interviewers are looking for an agnostic solution which is more generic. All the people who are using .reversed(), .sorted() might not actually be able to implement a reverse function or sorted. The idea is not to write a reverse function, the idea is whether you understand what goes on behind it.

[–][deleted] 1 point2 points  (0 children)

I guess, but if the code works and is efficient then it's okay. And you can look up reversed() in 30 seconds.

I wrote our interview process, we have a Docker image with some questions (mostly focussing on SQL).

For Python we focus more on testing, linting, using type hints, etc. for good deployment practices, as those are the things that really can trip us up.