I would like you to help solve the problem, the essence is:
There is a code whose purpose is to select random values from an array of groups until these values actually run out. The code is:
import vk, csv, random session = vk.Session() api = vk.API(session) with open('current_groups_2.csv', 'r') as f: reader = csv.reader(f) reader = map(int, f) group_list = list(reader) if random.choice(group_list) > 0: x = random.choice(group_list) photo = api.groups.getById(group_id = x, fields = 'members_count') print(sorted(photo)) So far, the variable x is assigned one value. How to make the program after each pass choose a new value of x?
Thank you in advance.