while b <= c:
con = sqlite3.connect("dannie_2.db")
cur = con.cursor()
cur.execute(f"SELECT id, name, balance FROM users")
users = cur.fetchall()
a = str(users[-b])
message(message.chat.id,text=a)
b = b+1
con = sqlite3.connect("dannie_2.db")
cur = con.cursor()
cur.execute(f"SELECT id, name, balance FROM users")
users = cur.fetchall()
for user in users:
message(message.chat.id,text=str(user))
cur.execute(f"SELECT id, name, balance FROM users order by id desc")
choice_1 = 'yes'
self.choice_var = choice_1
self.choice_var = ('no')
from dataclasses import dataclass
a_list = [1, 2]
@dataclass
class T:
new_list: list = None
def assign(self):
self.new_list = [3, 2]
return self.new_list
t = T(a_list)
print(t.assign(), a_list)
[3, 2] [1, 2]
def outfile(test):
print(test)
content = get_content(html)
outfile(content)
#file = open('parse.txt','w')
#file.write(str(test))
#file.close()
def parse():
html = get_html(URL)
if html.status_code == 200:
get_content(html.text)
else:
print("Error")
parse()
def parse():
html = get_html(URL)
if html.status_code == 200:
content = get_content(html.text)
print(content)
else:
print("Error:", html.status_code)
parse()