0
How can one use standard functions for filter and map?
5 Antworten
+ 4
print(list(map(str.lower,"abx")))
print(filter(str.isalpha,list("123abc")))
+ 3
Shaxzoda Sherzodovna
May you not answer like that in discussion forum.
Let it be to those who knows.
Follow community guidelines of the forum from here-
https://googleweblight.com/i?u=https://www.sololearn.com/Content-Creation-Guidelines/&hl=en-IN
0
Kevin Star it works!
Great. Thank you! But why as method of str?
Lambdas are pure functions.
oh wait...
there is a difference between len(str) and str. lower().
Is it that?
0
got it
from functools import reduce
import string
print(reduce(str.__add__,filter(lambda c: c.isalpha() or c == " ",(list(input())[::-1]))))
🕷️🕷️
- 2
I dont know