import vk
session = vk.AuthSession(app_id=6086625, user_login='****', user_password='*****')
vkapi = vk.API(session)
friends = vkapi.users.search(city =1)
print (len(friends))
# -*- coding: utf-8 -*-
import vk_api
def main():
login, password = 'ТВОЙ e'mail', 'ТВОЙ password'
vk_session = vk_api.VkApi(login, password)
try:
vk_session.auth()
except vk_api.AuthError as error_msg:
print(error_msg)
return
vk = vk_session.get_api()
response = vk.users.search(city =1)
print response
if __name__ == '__main__':
main()