0
How to solve this?
Given a list of names, output a list that contains only the names that consist of more than 5 characters. names = (Fredrick, Ali, Veronica, George, Anamika) Using map, filter,
10 odpowiedzi
+ 7
Here is the solution: https://code.sololearn.com/cc20OMa31l1Y/?ref=app
You just had a few things around the wrong way.
+ 5
Rajat Banerjee we are not here to do your work for you. Please attempt the problem and show us where you got stuck or the code failed to obtain the output required.
Thanks and happy coding.
+ 3
Hey !
here is my attempt
res = list(filter(lambda x: len (x)>5, names ))
print (res)
+ 1
Here is my attempt.
+ 1
Thank you for all your help and support. I am new and still try to grasp coding.
0
Where’s your attempt?
0
res = len (filter(lambda x: x>5, names ))
print (res)
0
Huh I am new here how do I start I don't understand
0
res=list(filter(lambda x:len(x)>5,names))
print(res)
0
my version:
names = ['David', 'John', 'Annabelle', 'Johnathan', 'Veronica']
res = list(filter(lambda x: len(x) > 5, names))
print(res)