================================ NOTE: NOTE: NOTE: ================================ Because I know that if I don't mention this, some people comment and say some stuff, I want to say it in advance: Using "set" is not wrong per se. But if you want to preserve the order, it's very obvious that "set" doesn't do so. So you should use another method. And I've said this explicitly in the video. Thanks for watching the video and reading this comment. See you in the next video.
================================
NOTE:
NOTE:
NOTE:
================================
Because I know that if I don't mention this, some people comment and say some stuff, I want to say it in advance:
Using "set" is not wrong per se. But if you want to preserve the order, it's very obvious that "set" doesn't do so. So you should use another method. And I've said this explicitly in the video.
Thanks for watching the video and reading this comment.
See you in the next video.
caveat: Python 3.7 or later for those still stuck in 2017 or earlier
thanks
list(sorted(list(set(x))))
But it's wrong!
Because I said in the video that we want to keep the original order (And NOT sorting!)
👏👏
thanks