# -*- coding: utf-8 -*-
"""
Created on Tue May 19 07:29:23 2026

@author: student
"""

def usuwanieDuplikato(lista):
    zbior = set(lista)
    return list(zbior)

lista = ["apple", "apple", "number", "banan"]
nowaLista = usuwanieDuplikato(lista)
print(nowaLista)


def poprNaw (tekst):
    stos = []
    for elment in tekst:
        if elment=='(':
            stos.append(elment)
        elif elment == ")" and len(stos) == 0:
            return False
        elif elment == ")":
            stos.pop()
        
    return len(stos) == 0

tekst = "(a+b)+c"
tekst1 = "(a+b))+c"
tekst2 = "((a+b)+c"

print(poprNaw(tekst2))