Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions ch08-modules/e36b3_fromkeys_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@


def fromkeys_func(s, func):
output = {}

for one_item in s:
output[one_item] = func(one_item)

return output
return {key: func(key) for key in s}