You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromlinqitimportListprogrammers=List()
Avi=type('Avi', (), {})
# Go ahead and fill the list with whatever you want... like a list of <Programmer> objects.# Then play:last_hot_pizza_slice=programmers.where(lambdae:e.experience>15)
.except_for(elon_musk)
.of_type(Avi)
.take(3) # [<Avi>, <Avi>, <Avi>]
.select(lambdaavi:avi.lunch) # [<Pizza>, <Pizza>, <Pizza>]
.where(lambdap:p.is_hot() andp.origin!='Pizza Hut').
.last() # <Pizza>
.slices.last() # <PizzaSlice># What do you think?
I think there's a syntax error… .except_for(elon_musk) is not part of the last_hot_pizza_slice = … statement. You may add parenthesis around the whole statement.
I also think that there is an extra dot after p.origin != 'Pizza Hut')
You may also use black to format the code. This would finally give:
fromseven_dwwarfsimportGrumpy, Happy, Sleepy, Bashful, Sneezy, Dopey, DocfromlinqitimportListprogrammers=List()
Avi=type("Avi", (), {})
# Go ahead and fill the list with whatever you want... like a list of <Programmer> objects.# Then play:last_hot_pizza_slice= (
programmers.where(lambdae: e.experience>15)
.except_for(elon_musk)
.of_type(Avi)
.take(3) # [<Avi>, <Avi>, <Avi>]
.select(lambdaavi: avi.lunch) # [<Pizza>, <Pizza>, <Pizza>]
.where(lambdap: p.is_hot() andp.origin!="Pizza Hut")
.last() # <Pizza>
.slices.last() # <PizzaSlice>
)
# What do you think?
BTW, your project seems fun to try, thanks for what you've done.
The text was updated successfully, but these errors were encountered:
Thanks a lot for your feedback,
I haven't use any linter for the README code, that's a great idea.
I have corrected the README with your suggestions. 💯
The README says:
I think there's a syntax error…
.except_for(elon_musk)
is not part of thelast_hot_pizza_slice = …
statement. You may add parenthesis around the whole statement.I also think that there is an extra dot after
p.origin != 'Pizza Hut')
You may also use black to format the code. This would finally give:
BTW, your project seems fun to try, thanks for what you've done.
The text was updated successfully, but these errors were encountered: