Questions tagged as 'python'

3
answers

Python problem. Collate words

I have the following program:    Write a function that receives two strings as parameters and return   a new string consisting of the first, but with the second string   interleaved between each letter of the first. For example if the st...
asked by 03.01.2018 / 15:25
1
answer

How to display on-screen BBDD records in Python?

Hello, I hope so. When I execute in Python the part of the menu runs fine but when I would have to show the data of the person that is in the table, [] appears. Selecciona una opción para Buscar Paciente 1 - Por DNI 2 - Por nombre...
asked by 27.12.2018 / 15:21
3
answers

Lower and upper case function in python

I am a beginner in python and maybe this question seems simple to some but well, here I want to ask how I could ask for text by keyboard and that text that is automatically saved in uppercase? dni = int(input("Ingrese su numero de DNI: ")) nom...
asked by 29.12.2018 / 05:57
1
answer

Django ImproperlyConfigured at

I am starting to use multitenant but I have not been able to move forward because I get this error: I have not changed anything in the URLs, I share my distribution of files: The main file urls.py of the project (pruebatenant)...
asked by 13.01.2016 / 18:03
1
answer

Count characters of a String

It is correct to count characters of a string in the following way: cadena = "este es un texto de prueba" total_caracteres = len(cadena) print total_caracteres now the doubt arises when I have a text with an average of 10,000 characters or...
asked by 03.01.2019 / 20:43
1
answer

How do I execute a script from tkinter without the window crashing?

I am creating a program, but so that you do not have to run that program by double-clicking, I am creating an app in tkinter that will take care of that. The problem is that, when I run the program from the button, it is executed, but the tkint...
asked by 29.11.2018 / 04:02
2
answers

Print certain pandas rows

I have a dataframe similar to the following: I want to show those columns that any of their rows contain a NaN, NaT or None. If I apply the following code I see what they are: def null(x): return any(pd.isnull(x)) print df.appl...
asked by 09.12.2018 / 19:39
1
answer

Count line breaks in a file.txt with Python

I am doing a lexical analyzer for a class and one of the things that it must accomplish is to count the line breaks. How can I count the line breaks in Python from a text file? This is my code, am I using regular expressions? **def newLine(lin...
asked by 12.12.2018 / 08:41
2
answers

Error DeleteView

Hi, I have a problem with my DeleteView in Django 1.8, I get this error:    TemplateDoesNotExist at /eliminar_tipo_almacen/38/appkardex/tipo_almacen_confirm_delete.html views.py: from django.views.generic import ListView, Updat...
asked by 27.01.2016 / 02:17
2
answers

Infinite while loop - python

This exercise is a simulation of a ship arrival system playing with random numbers. Initially, a random number is run to know how many ships arrive during the day. immediately another is generated to see how many ships from which they arrived ca...
asked by 02.11.2018 / 19:31