Questions tagged as 'python-3.x'

2
answers

How to compare 2 lists in python 3?

I'm working on Python 3.4, I have 2 lists: lista_1 = ['2017-10-01', '2017-10-02', '2017-10-03', '20107-10-04'] # Fechas de un periodo lista_2 = [['20107-10-01', campo2, campo3], ['2017-10-03', campo2, campo3], ['2017-10-04', campo2, campo3]]...
asked by 20.10.2017 / 19:24
1
answer

Print elegantly

I want to know how I should print the data on the screen so that it comes out in an "elegant" way, that is to say that each column is shown vertically ordered. I am using the following method: print("%s: %12i %25.2f "%(string,valor_int,valor_f...
asked by 03.12.2017 / 15:40
0
answers

Improve a program to rate sentences [closed]

I have a comma-spaced csv file similar to this: ID,texto1,texto2,texto3 1,El niño juega, El hermano come mucho, El padre bebe y juega 2,El tío es feliz, Los hemanos Karamazov cantan y Gogol bebe, No me interesa 3, Sí, No, No lo sé I am tryi...
asked by 06.11.2017 / 17:43
2
answers

Incorrect operation of a character counter within strings in Python

Suppose I have the following sentence: oracion = 'Mi perro bonito come todas las noches' And I want to create a function that tells the occurrence of each character within it. To that end, we import string and create an alphabet that is our...
asked by 12.10.2017 / 07:21
0
answers

Create a language system in python

I will create an open-source application for management with Kivy and I want to have a menu to choose between the languages: Spanish, Galician and English and that the user can choose the one they want. And then another file where the configu...
asked by 13.10.2017 / 21:23
2
answers

Generate random dates

I am making a program that randomly generates dates and prints them, if the date falls on a holiday, print a message such as: Happy Halloween! Now, if the chosen month is February and the day is one that February does not have, such as 29, 30 or...
asked by 31.10.2017 / 00:39
1
answer

Make it change QLabel

I am practicing with PyQt and I have done an exercise that prints on the console which button I press, then I wanted to change it so that it appears in QLabel , pro gives me an error    File "call.pyw", line 30, in b1_clicked    ...
asked by 06.10.2017 / 17:46
0
answers

Use PyQt5 with Qgis 2.99 in Windows

I want to be able to program in Qdesigner, therefore I install PyQt5, GIS applications, importing QGIS 2.99 in PyQt to be able to use Qgis I read a lot because I can not do the import of Qgis in python 3.5    Operating System: Windows 7 -...
asked by 22.09.2017 / 14:01
1
answer

ImportError: DLL load failed using sklearn

I have a Laptop with Win10 and I am working in Python3.6, and as a development environment I use PyCharm. I have installed the following packages through Pip: cycler (0.10.0) matplotlib (2.0.2) nose (1.3.7) numpy (1.13.1) pandas (0.20.3) p...
asked by 25.09.2017 / 19:30
1
answer

How to use subprocess

I do not know if there is any way to capture what comes out in the cmd, and tried to do this, it shows me the information but it does not generate the file and it throws me this error: Traceback (most recent call last): File "comandos.py",...
asked by 24.09.2017 / 15:54