Is there a map without result in python? [duplicate]

You could make your own “each” function:


def each(fn, items):
    for item in items:
        fn(item)


# called thus
each(lambda x: installWow(x, 'installed by me'), wowList)

Basically it’s just map, but without the results being returned. By using a function you’ll ensure that the “item” variable doesn’t leak into the current scope.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)