# don't shadow `dict`
d = {'AB': 1, 'AE': '0', 'CC': '3'}
# `starmap` flattens argument to a function
# needed for `str.format`
from itertools import starmap
# build parts from dictionary items
parts = starmap('{}{}'.format, d.items())
# build end result from parts
result = ','.join(parts)