D
D
drqqv2022-03-24 01:05:13
Python
drqqv, 2022-03-24 01:05:13

How to use **kwargs?

Rubric stupid questions on python. Tell me, kind people, how to use **kwargs?
623b992f82dda567989185.png

print(len(followers_id)) always prints 100

# Получение списка подписчиков
followers = api.user_followers(int(list), token,  **max_id)

print(followers)

followers = json.dumps(followers)
list_followers = json.loads(followers)
followers_id = dp.values(list_followers, "/users/**/pk")
print(len(followers_id))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2022-03-24
@galaxy

Either like this:

m = 12345
followers = api.user_followers(int(list), token,  max_id=m)

either like this:
kw = {"max_id": m}
followers = api.user_followers(int(list), token,  **kw)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question