I'm learning Python and the imports that have accumulated whilst developing my app seem like I'm repeating imports. Please can someone advise me on development practices.
from pathlib import Path
from urllib.request import urlopen
from gi.repository import Gtk, Gio
from gi.repository import GLib as glib
from gtk_assistant import AssistantApp
import urllib.request
import urllib.error
import xml.etree.ElementTree as ET
import json
import gi
import sys
import os
import hashlib
gi.repositoryimports could be grouped, but I am not sure this is considered best practice. Ultimately they should work best for the readability of the following code. You could try if e.g. PyCharm's Optimize import feature produces something to your liking. I like to useimport ...as much as possible, so that I know everywhere in my code, where something is coming from.