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)
python: preserve certain values when removing from a nested list
I have a nested list as follows:
my_list = [['id_1', {'frame':[{'door': 'window', 'closet':'pinches'}], 'utterance':'sentence number 1', 'speaker':'silver'}],
['id_2',{'frame':[{'door': 'window', 'cl...
zara kolagar
Votes: 0
Answers: 2
Using FOR in a batch file for deleting specific files at once
I'm trying to search for specific files in all directories and subdirectories inside my batch file path in order to delete them at once :
for /F "delims=" %%A IN ('dir /B /S %~dp0bb1-*.png b...
Torieu
Votes: 0
Answers: 0
Python Memory not reclaimed after GC
Python in Mac: I was trying to understand gc.collect() and i wrote this code.
My expectation is that value of diff should be zero, but it isn't.
import gc
import numpy as np
import psutil
def create_...
stonelazy
Votes: 0
Answers: 0
using python `del` on a list index deletes the corresponding item in other identical lists
I'm new to using python's del keyword, and I ran into a problem.
I define two lists that have the same elements like this:
>>> list1 = [1, 2, 3, 4, 5, 6]
>>> list2 = list1
I want to...
Ayush
Votes: 0
Answers: 0