python import different version of package code example
Example: import different module based on python version
try:
import simplejson as json
except ImportError:
import json
try:
import simplejson as json
except ImportError:
import json