python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Replace items of a longer list with matches from a shorter list
My goal is to compare two lists as follows:
Take every item in long_list and compare it for substrings to the entire short_list. If there is a match, add the item from the short_list to new_list. If n...
päger
Votes: 0
Answers: 1
Replace list element with class instance
I have a class that transforms list like [1, 2] into symbols. It take 2 positional arguments that correspond to each of the elements in the list. I am making another function that takes in argument a ...
zacharie picard
Votes: 0
Answers: 1
More elegant way to create a python dictionary from a map object and list
someList=['this','that','the_other','and_this']
timeFrame='hour'
getDatafromFile(some_string,time_frame):
do some processing
return dataframeObject
The end result is a dictionary with a keyed...
horsehead97
Votes: 0
Answers: 2