Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • What's the difference between sys.path.insert() and sys.path.append()? Commented Aug 10, 2021 at 14:34
  • 2
    @Chaos_Is_Harmony, the difference is that the new path is added at the beginning of the list, shifting everything else to the right. It affects the order things are looked into (first or last ?). If you don't care about that, then insert(0, ...) might be slightly longer (O(N) instead of O(1) for append). Commented Aug 10, 2021 at 18:14