Skip to content
Advertisement

Tag: for-loop

How can I get a row in Sqlite3 table with Tkinter Listbox widget?

I have Python program connected to Sqlite3 database with Tkinter on the frontend. My database table (subjectlist) consists of four columns: [id (unique interger), subject (text), serial (unique interger), is_active (boolean interger)]. Here is my program: Currently at runtime when I click item on listbox (which basically shows all subject column values that have is_active=1 on the same row) and

How can I get the value of a row in a column in SQLite 3 table with Tkinter Listbox widget?

I have Python program connected to SQLite 3 database with Tkinter on the frontend. My database table (subjectlist) consists of three columns: [id (unique interger), subject (text), serial (unique integer)]. Here is my program: Currently at runtime when I click item on listbox (witch basically shows all subject column values) and then press Tkinter button I get the subject I

Efficient way for checking number 3^x * 5^y

I want to check if number, based on lower and upper bound, has prime divisors only 3 and 5 and number should be multiplication of power of 3 and power of 5. My current solution is this. I want to optimize it, since checking powers with for loops isn’t good way in my opinion. Thanks in advance. Based on comments

How do I make a list of imported classes in Python?

Is there a way to avoid having to call foo(x)for each imported object? Some context: a, b, c are webpage classes and foo is a route() function that creates a route for each webpage. Update: There will be a growing list of imported classes in the main module as the application grows. I mentioned a, b, and c simply as

I can’t do anything with python dict? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question Im really stuck with a little problem that I have. Currency_price.json is a file which contains a dictionary like this:

Advertisement