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
I'd go one step further - use an editor or an IDE that is smart enough to deduplicate the imports automatically and reorder them alphabetically for you
Quick tip: alphabetize
I'd go one step further - use an editor or an IDE that is smart enough to deduplicate the imports automatically and reorder them alphabetically for you