
Python
1
Вклад в тег
from jopa import siski
# добавление vip id в файл
with open('data.txt', 'a') as file:
file.write(f'{new_vip_id}\n') # a - режим открытия на дозапись
# поиск наличия id в файле
with open('data.txt', 'r') as file:
for line in file:
if user_id in line:
print('ID пользователя в базе')