I want to do it with Python lambda Django, but I will stop

I want to do it with Python lambda, but stop

sum(list(map(lambda item3: len(item3), list(filter(lambda item2: item2[0].hoge == 3, list(
    map(lambda item: list(item.huga.all()), list(piyo.all())))))
             )))

** Doyadoya ** lambda expressions combined with Django queries.

I will die after a month, so I will stop

#Data acquisition
piyo_list = list(piyo.all())

#Get detailed data
huga_list = list(map(lambda item:list(item.huga.all()), piyo_list))

#Level 1,Get 2
hoge_list = list(filter(lambda item: item[0].level == 1 or item[0].level == 2,huga_list))

#Level 1,Get the number of 2
level_list = list(map(lambda item: len(item), hoge_list))

#Get the total number of levels
sum_level = sum(level_list)

I know I want to do it, but I will stop.

Recommended Posts

I want to do it with Python lambda Django, but I will stop
I want to tweet on Twitter with Python, but I'm addicted to it
I want to AWS Lambda with Python on Mac!
[ML Ops] I want to do multi-project with Python
I want to do ○○ with Pandas
I want to debug with Python
I want to analyze logs with Python
I want to play with aws with python
I want to do a full text search with elasticsearch + python
I want to do Dunnett's test in Python
I want to use MATLAB feval with python
I want to make a game with Python
It's more recent, but I wanted to do BMI calculation with python.
I want to use Temporary Directory with Python2
#Unresolved I want to compile gobject-introspection with Python3
I want to solve APG4b with Python (Chapter 2)
I want to write to a file with Python
The file edited with vim was readonly but I want to save it
I want to send Gmail with Python, but I can't because of an error
I was able to mock AWS-Batch with python, moto, so I will leave it
I want to scroll the Django shift table, but ...
I want to handle optimization with python and cplex
I want to inherit to the back with python dataclass
I want to work with a robot in python.
I was able to repeat it in Python: lambda
I want to run a quantum computer with Python
I want to do something in Python when I finish
I want to bind a local variable with lambda
Do Django with CodeStar (Python3.6.8, Django2.2.9)
Do Django with CodeStar (Python3.8, Django2.1.15)
I want to specify another version of Python with pyvenv
I want to be able to analyze data with Python (Part 1)
I want to do something like sort uniq in Python
I want to make a blog editor with django admin
Challenge problem 5 with Python: lambda ... I decided to copy without
I want to be able to analyze data with Python (Part 4)
I want to be able to analyze data with Python (Part 2)
I want to automatically attend online classes with Python + Selenium!
[Python] I want to use the -h option with argparse
To do tail recursion with Python2
What to do with PYTHON release?
Don't write Python if you want to speed it up with Python
I want to use a wildcard that I want to shell with Python remove
I want to know the weather with LINE bot feat.Heroku + Python
I want to monitor UNIQLO + J page updates [Scraping with python]
I want to solve APG4b with Python (only 4.01 and 4.04 in Chapter 4)
I want to output the beginning of the next month with Python
[Python / AWS Lambda layers] I want to reuse only module in AWS Lambda Layers
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I made a segment tree with python, so I will introduce it
[Python] Although it is a humanities, I will do my best to understand bit full search
How to do arithmetic with Django template
I want to blog with Jupyter Notebook
I want to use jar from python
I wanted to solve ABC160 with Python
I want to build a Python environment
I want to pip install with PythonAnywhere
How to do portmanteau test with python
Connect to s3 with AWS Lambda Python
I wanted to solve ABC172 with Python
What skills do I need to program with the FBX SDK Python?