Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
0 answers
100 views

Save JSON string in dynamic global dictionary , python

I am new to python. I have multiple JSON messages coming to the python application trough MQTT broker with the same keys but different values. what I am trying to do is to store the JSON string on a ...
Mr.D's user avatar
  • 11
0 votes
1 answer
43 views

In Matplotlib, try to store mouse positions in a dictionary. But it can only leave the last item

I tried to use Matplotlib in Python 3.7 to get a series of coordinators in a dictionary (or List). I want to use SHIFT with mouse left key to get current positions and store them in a temporary ...
Junqi Ding's user avatar
-2 votes
2 answers
63 views

Storing list into dictionary from excel- part 2

I have a list and I want to convert it into expected dictionary output. list is: [['Nodeb_IN_New',107,'class-default',['h10'],['h1'],[7],'dscp-fc-map',['ef']],[",","['h11'],['h2'],[5],'dscp-fc-map',...
sonali's user avatar
  • 69
1 vote
5 answers
65 views

how to iterate over a dictionary from value in an array and store in a new dictionary

I have an array(Arr[]), for each item in the array i would like for it to go through a dictionary(specs{}) and calculate the corresponding values and store them in a new dictionary but on sure how to ...
offthehook's user avatar
0 votes
1 answer
15k views

how to store a dictionary within a for loop

I want to store the values of data in a dictionary my dict{} but i got an error. mydict= {} for entity in entities: if entity.entity_id.startswith('sensor'): list = remote.get_state(api,...
AhmyOhlin's user avatar
  • 549
1 vote
3 answers
100 views

Store points by x, y and multiple z

I will write an example so you can understand me : For instance, I have these 3 points : (0, 1, 244) - (0, 1, 255) - (1, 2, 133) Actually I need to average the Z when 2 points have the same (x, y). ...
Sebastien P.'s user avatar
0 votes
1 answer
52 views

using dictionaries/classes in python 2.7

Hi im trying to create a program where a user input would be stored in a dictionary/class (really new to this unsure of the terminology). but basically i would like to have 3 dictionaries/classes at ...
user3092467's user avatar
0 votes
3 answers
220 views

how to store dictionary items in a list

This question is sorta hard to make into a one lined question so im going to have to explain. Im trying to check a given string to see if the contents in the string has whats inside the dictionary, if ...
Adam Spencer Baker's user avatar
6 votes
2 answers
8k views

Store large dictionary to file in Python

I have a dictionary with many entries and a huge vector as values. These vectors can be 60.000 dimensions large and I have about 60.000 entries in the dictionary. To save time, I want to store this ...
Cassie's user avatar
  • 372
13 votes
5 answers
17k views

Store a dictionary in a file for later retrieval

I've had a search around but can't find anything regarding this... I'm looking for a way to save a dictionary to file and then later be able to load it back into a variable at a later date by reading ...
Ryflex's user avatar
  • 5,779
1 vote
4 answers
237 views

Dictionaries store pairs. Who stores triples?

We would use a dictionary to store for example: a={"breakfast":"banana","lunch":"fish","dinner":"soup"} What would your approach be if you want to add the time attribute alongside every key-value set....
multigoodverse's user avatar
0 votes
1 answer
125 views

how to store on server , and access big wordlist most efficiently ? [closed]

I need for my webapp a wordlist file with about 200k words, and I would like display words, which begins with a certain substring for example : 'clo'. Should i just store it in database, and access it ...
user1843766's user avatar
  • 1,053