Removing duplicates and printing the string in specific output in python : Well, I tried my hardest to get it done! but i end up failing this at deleting duplicates at listing them. Can you guys tell me how to do this one or any clue?    

Here's the output I want to get:

    Please enter sentence: Hello Python!
    ' '	1
    '!'	1
    'H'	1
    'P'	1
    'e'	1
    'h'	1
    'l'	2
    'n'	1
    'o'	2
    't'	1
    'y'	1
    [' ', '!', 'H', 'P', 'e', 'h', 'l', 'n', 'o', 't', 'y']

This is the code I tried:

    from collections import OrderedDict
    def rmdup(str1):
        return "".join(OrderedDict.fromkeys(str1))
    str = input('Please enter sentence: ')
    sorted-str = sorted(str)
    str1 = []
    for i in range(len(str)):
        j = sorted-str.count(sorted-str[i])
        str1 = list(rmdup(str1))
        print('%r' % sorted-str + '\t' + '%r' % j)
    print(str1)

and here's what the output I get: 

    Please enter sentence: Hello Python!
    ' ' 1
    '!' 1
    'H' 1
    'P' 1
    'e' 1
    'h' 1
    'l' 2
    'l' 2
    'n' 1
    'o' 2
    'o' 2
    't' 1
    'y' 1
    [' ', '!', 'H', 'P', 'e', 'h', 'l', 'n', 'o', 't', 'y']