Avatar ·

Python 3 multidimensional dictionary

📁 dictionary, Advanced Python Topics, Error, example, work

While learning Python 3.x, I completed basic courses. Previously I wrote in PHP.

Now I decided to implement a planned task:

  1. Read csv
  2. As I read file lines, process them and write to an array, creating the required structure
  3. ...

Here is my code

import csvdef gene_name(gene, polfzm, genotype):    retu '_'.join([gene, polfzm, genotype]).strip().replace("" "", ""-"")data = {}genes = []with open('example-2.csv', 'r') as file:                    
Avatar ·

The grequests library is an asynchronous wrapper over the regular requests library. Accordingly, when you pass a batch of request objects to grequests.map(), you will get a list of response objects, roughly like this:

[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, None, <Response [200]>]

And you work with them as with regular requests.Response objects.

For example, to see the result of the first request in your code, try doing something like this:

import
                            

Log in to leave an answer

Blogs