Set .add()

  • + 35 comments

    One line without add():

    print(len(set([str(input()) for x in range(int(input()))])))