
#python #programowanie #naukaprogramowania
jak to zrobić żeby przeszło
w sensie żeby wyszykało hallo, hallo! itd
def validate_hello(greetings):
return greetings in ["hello","ciao","salut","hallo","hola","ahoj","czesc"]jak to zrobić żeby przeszło
validate_hello('hallo, wie geht\'s dir?')w sensie żeby wyszykało hallo, hallo! itd
- Najlepsze
- Wszystkie komentarze







"hallo, wie geht\'s dir?"hello_words = ["hello","ciao","salut","hallo","hola","ahoj","czesc"]
greetings = "hallo, wie geht\'s dir?"
any(hello_word in greetings for hello_word in hello_words)
https://stackabuse.com/python-check-if-string-contains-substring/
Komentarz usunięty przez autora