Skip to content
Advertisement

Tag: list

Exctract a value from a Json file(python)

Hi i’m not an expert and this problem kept me stuck for such a long time I hope that someone here can help me i would like to exctract the value “interestExpense” from the following json file: In this case the result should be -130000000 as a string but i m trying to find a way to create an list(or

How to make list numbers by formula

hey everyone i have a question how i make a formula that makes my numbers in list specific first i need it to start whith number 4 then if if its higher than 6 it needs to restart from 0 it would look like this 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4

Python: convert dictionary into a cvs file

This is my current code: What I am trying to achieve is that the dictionary keys are turned into the csv headers and the values turned into the rows. But when running the code I get a TypeError: ‘string indices must be integers’ in line 21. Answer Problem The issue here is for row in data. This is actually iterating

Repeat list elements based in another list

I would like to repeat elements from one list based in a second list, like this: I’ve got this result: I’d like to get this result: Answer You may iterate on both list together, using zip, then increase i until you reach the bound of the current value

python3 join lists that have same value in list of lists

I have similar question to one that has been asked several years ago, the link is down here. the thing is that all answers are in python 2 and does work for me. my lists are huge so time is important. if anyone can solve that for python3, that will really help. Consider this list of lists: I want to

Searching for matching attributes

My special objects have one list of attribute-values (that is a varying list of abbreviated strings of short but differing length meaning some capabilities of any object) → [‘A’, ‘B’, ‘AC’, ‘BC’, …] running the program I’m searching for at least one existing match out of a varying search-list → [‘BC’, ‘BP’, ‘X’, …] At the moment I solved that

Advertisement