#!/usr/bin/env python # -*- coding: utf-8 -*- """ * Podziel zmienną `text` na słowa, korzystając z metody split. * Dodaj do listy `oov`, wszystkie słowa (bez powtórzeń), które nie są zawarte w liście `vocab`. """ text = "this is a string , which i will use for string testing" vocab = [',', 'this', 'is', 'a', 'which', 'for', 'will', 'i'] text = text.split(' ') oov = [] for word in text: if word not in vocab and word not in oov: oov.append(word) print(oov)