I am trying to print only the maximum occurring character and its count.
import collections s = raw_input() k = (collections.Counter(s).most_common(1)[0])
You can make a list and join it, first converting all to strings:
",".join([str(s) for s in list(k)])