Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12945465
collections.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
961 B
Referenced Files
None
Subscribers
None
collections.py
View Options
# -------------------------------------------------------------
# Merge dictionaries :: Utilities :: Collections
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Helper functions for lists
# License: BSD-2-Clause
# -------------------------------------------------------------
from
typing
import
List
def
remove_words
(
current_words
:
List
,
words_to_delete
:
List
)
->
List
:
"""
Removes specified words from a list of words.
Parameters:
current_words: list
The list of words from which specified words are to be removed.
words_to_delete: list
The list containing words that need to be removed.
Returns:
list
A new list containing words from the current_words list that are not
present in the words_to_delete list.
"""
words
=
list
(
set
(
current_words
)
-
set
(
words_to_delete
))
words
.
sort
()
return
words
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Tue, Nov 18, 17:39 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3176650
Default Alt Text
collections.py (961 B)
Attached To
Mode
rMD Merge dev dictionaries
Attached
Detach File
Event Timeline
Log In to Comment