Quick tip: alphabetize

If you have a list, say of imports, where there is no semantic meaning in the ordering, alphabetize it. Alphabetizing makes it easier to find duplicates.

For example

Unsorted

Find the duplicate:

import os
import argparse
import copy
import sys
import datetime
import selenium.webdriver.support.expected_conditions
import datafetcher
import passlib.hash
import multiprocessing
import db
import ttest
import backtester
import numpy
import json
import serializers
import errors
import sys
import pytest
import traceback
import time
import selenium.webdriver

Sorted

Find the duplicate:

import argparse
import backtester
import copy
import datafetcher
import db
import datetime
import errors
import json
import multiprocessing
import numpy
import os
import passlib.hash
import pytest
import selenium.webdriver
import selenium.webdriver.support.expected_conditions
import serializers
import sys
import sys
import time
import traceback
import ttest