Posts by Anselmo Blanco Dominguez • 302 points
7 posts
-
1
votes2
answers116
viewsA: Try and except block
The input returns string. So, before making accounts with the returns you should convert them. In addition, you say that the example is two executions of the program, so it is understood that when…
-
0
votes1
answer36
viewsA: help with request
Looking at your code, it seems to me you want something like this: import requests while True: url = input("url: ") lista = ['blog', 'ftp', 'cpanel', 'intranet'] for list in lista: url2 =…
-
2
votes2
answers2309
viewsA: What is the isset equivalent of PHP in Python
As built-in functions locals() and globals(), indicate the local and global symbol tables respectively. You can check if the variable name_var exist in those dictionaries as follows:: if 'nome_var'…
-
1
votes3
answers416
viewsA: How to Insert in a non-zero position in an empty list?
You can use a customized version of List. import collections class MyList(collections.UserList): def insert(self, i, item): for _ in range(self.__len__(), i): self.append(None) super().insert(i,…
-
3
votes2
answers7523
viewsA: Get the most recent month’s records
If you want to find all records where the field in question has the same month and year as the current date, this is equivalent to looking for values greater than or equal to the first day of the…
mysqlanswered Anselmo Blanco Dominguez 302 -
2
votes1
answer1048
viewsA: Add LISTVIEW column
Follows part of the source code of a form I created to test the solution. type TfrmPrincipal = class(TForm) lvLista: TListView; btnSoma: TButton; procedure btnSomaClick(Sender: TObject); private {…
delphianswered Anselmo Blanco Dominguez 302 -
5
votes2
answers81
viewsA: which SQL command would display records where the Lastname field is "Duck" and the date in the Birthdate field is greater than 01/01/1950?
Assuming the table name in question is "myTable": select * from mytable where lastname = 'Duck' and birthdate > '1950.01.01' Command tested in Mysql 5.5. Note: Whenever possible, I recommend to…
mysqlanswered Anselmo Blanco Dominguez 302