Hello!
I'm developing a Django application.
On the project registration page there is a SelectMultiple pro user to select the participating teachers.
But on the details page I just wanted to see the names of the teachers who were selected in the...
If I create two lists, and then I add the two, I create a third one that has all the items of the previous two:
>>>a = [1, 2, 3]
>>>b = [3, 4, 5]
>>>c = a + b
>>>print c
[1, 2, 3, 3, 4, 5]
How can I preve...
Hello, please, I would like to copy a certain list in python. The total size of the list is 150 and I want to remove the last 50 items from the list. Here I will represent a list 100 times smaller, that is to say with 15 elements and that I want...
The following class hierarchy, where class "A" has an abstract method called "foo":
# -*- coding: utf-8 -*-
import abc
class A:
__metaclass__ = abc.ABCMeta
def __init__(self):
pass
@abc.abstractmethod
def foo(self):...
In Python, I know there is a difference between a Tuple and a List . The Tuple is immutable, and the List , changeable.
You may already have this question here: What is the main difference between a Tuple and a List...
I have a problem where I can not add anything to the table and the error always appears:
sqlite3.InterfaceError: Error binding parameter 0 - probably
unsupported type.
The code I'm trying to add values to and this:
p_name=input("...
I'm developing a graphical desktop application in Python using PyQt4 (Qt Designer), my doubt is about which component to use to display on my screen frmTelaPesqAluno records of a SQL query, and how to use it? It is a component similar...
I asked this question here in Stackoverlow View the last 5 lines of a file with PHP?
Now I would like to know how I could do the same thing in Python.
How could I get the last 5 lines of a large file, without having to fully load it into...
How do I do nested functions in Python? Another question, because I always need to use the self parameter, and have I already put parameters in the function?
For example, it is considered that the function generate_individual () is already im...