like this
reshared this
I have acquired what I believe to be a high-quality hand-me-down sewing machine from my mother-in-law. Now, apart from thread and fabric I only need to have one more thing...
...any idea whatsoever how to use it.
S3 E21 Inside the Minds of Two Detectives
In this episode of the Cult Vault podcast, host Kacey speaks with former detectives Scott Rogan and Peter Hogan, who share their experiences in the police forceSpreaker
like this
Also, do lists in #Python seriously not have a .map function?
Edit: Ohhh... I expected it to be a method on the list object itself.
Tech Cyborg reshared this.
Python map() function
The map() function is used to apply a given function to every item of an iterable, such as a list or tuple, and returns a map object (which is an iterator). Let's start with a simple example of using map() to convert a list of strings into a list ofGeeksforGeeks
Jonathan Lamothe likes this.
@flyingsquirrel Yup. And there's a multiprocessing version which can be useful if you're doing a very large csv but you probably want imap() for that one.
docs.python.org/3/library/mult…
multiprocessing — Process-based parallelism
Source code: Lib/multiprocessing/ Availability: not Android, not iOS, not WASI. This module is not supported on mobile platforms or WebAssembly platforms. Introduction: multiprocessing is a package...Python documentation
If you're looking for a function that applies another function to each element of a list and aggregates the results, it'd typically be done with a list comprehension:
[your_function(item) for item in your_list]
But you can also use list(map(your_function, your_list)) if you want. Basically, it's a built-in function rather than a method of the list class.
There's also a whole discussion to be had about lists vs generators and why you often wouldn't even need to make a list in the first place, but I won't get into that unless you want to know more.
Jonathan Lamothe likes this.
S3 E20 Extreme Evangelicalism in the Modern Age
In this episode of the Cult Vault podcast, host Kacey speaks with Cynane Shay, who shares her journey growing up in a fundamentalist evangelical Christian houseSpreaker
S3 E19 Abortion Rights in America
In this episode of the Cult Vault podcast, Dr. Warren Hern, a prominent abortion provider, discusses his extensive career in women's healthcare, the evolution oSpreaker
S3 E18 A Cult of Many Names: Julius Schacknow/Lord Julius/Brother Julius/The Work Cult
In this episode of the Cult Vault podcast, host Kacey speaks with Sarah Darmofalski, a former member of the Lord Julius cult. Sarah shares her experiences growiSpreaker
Nick
in reply to Jonathan Lamothe • • •redj 18
in reply to Jonathan Lamothe • • •