A
A
arsenly2020-07-13 16:19:00
Python
arsenly, 2020-07-13 16:19:00

Can't combine two variables?

I don't know how to connect two variables please help!

there in the user variable it is necessary to insert the uid variable how to do this?

messages = vk.method("messages.getConversations", {"offset": 0, "count": 20, "filter": "unanswered"})
uid = messages["items"][0]["last_message"]["from_id"]

user = vk.method("users.get", {"user_ids": uid}) #там где uid надо что бы была переменная uid как это сделать?
first_name = user[0]['first_name']
last_name = user[0]['last_name']

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmin44, 2020-07-13
@Dmin44

Good afternoon.
As far as I can see your code is correct and should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question