ezoic

Tuesday, March 7, 2017

Python problem 5

Write a Python program to print all unique values in a dictionary.

class Solution:
    def unique1(self, dict1):
        a1=[]
        for key in dict1.keys():
            a1.append(dict1[key])
        b1=set(a1)

        return(b1)


kk=Solution()
if __name__=="__main__":

    print(kk.unique1({"a":1,"i":1,"u":5}))

No comments:

Post a Comment

looking for a man

 I am a mid aged woman. I live in southern california.  I was born in 1980. I do not have any kid. no compliacted dating.  I am looking for ...