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])
for lists, we have strip "".join
method but how to deal with tuple the opposite way, i.e., removing the quotes and bracket.
So, here is what I want the output to be without quotes and brackets
input = "aaabucted"
output = ('a', 3)
I want the output to be a, 3
.
list
ortuple
(or some other things) tojoin()
.'a', 3
?