편집 기록

편집 기록
  • 프로필 초보자님의 편집
    날짜2021.08.17

    Set {} 처럼 묶어나올수 있도록 class를 어떻게 바꾸어야할까요


    class Set:
    
    
        def __init__(self, my_list={}):
            self.my_list = my_list
            print(my_list)
    

    a=Set([1,2,3,1])했을 때 {1,2,3}으로 나오고 중복이 제거되서 나오게 끔 클래스를 어떻게 구현할 수 있을까요?

  • 프로필 nowp님의 편집
    날짜2021.08.17

    Set {} 처럼 묶어나올수 있도록 class를 어떻게 바꾸어야할까요


    class Set:
    
    
        def __init__(self, my_list={}):
            self.my_list = my_list
            print(my_list)
    

    a=Set([1,2,3,1])했을 때 {1,2,3}으로 나오고 중복이 제거되서 나오게 끔 클래스를 어떻게 구현할 수 있을까요?

  • 프로필 알 수 없는 사용자님의 편집
    날짜2021.08.15

    Set {} 처럼 묶어나올수 있도록 class를 어떻게 바꾸어야할까요


    class Set:

    def __init__(self, my_list={}):
        self.my_list = my_list
        print(my_list)
    

    a=Set([1,2,3,1])했을 때 {1,2,3}으로 나오고 중복이 제거되서 나오게 끔 클래스를 어떻게 구현할 수 있을까요?