Questions tagged as 'python'

3
answers

How do I display the "Press ENTER to continue" in Python 3.4?

I wanted to know how to do the " Press ENTER to continue", or the " Press any key to continue " in Python 3.4 without having to create a variable just to store the ENTER.     
asked by 18.06.2015 / 04:18
1
answer

Merge CSV with Python

I have a collection of dozens of CSV files. Most of them share the same fields, but some have unique fields. I want to merge them by using Python in a single CSV file with a global header that includes all the fields of all the columns. I'm usin...
asked by 11.06.2015 / 21:55
1
answer

Count of a specific character in a word in Python 3 [duplicate]

I recently asked a similar question, but received answers where my entry was supposed to be a number. Can you count how many specific characters you have in a word? As in "example" it has "2 and".     
asked by 16.12.2017 / 15:06
1
answer

Extract information from lattes

Introduction Brazilian researchers have, since 1999, a website where they can post information about their academic career. This information is known as Currículos Lattes . I want to download a few thousand of these resumes and write, along...
asked by 18.04.2018 / 17:32
2
answers

Check file extension in template - Django

I have a Django application where in the template I need to validate the extension of a file coming from filefield. <div class="row"> <p class="anexos"> {% trans 'Anexos' %} </p> #if .jpg .png <div class="col-s...
asked by 04.08.2015 / 20:42
1
answer

Read multiple numbers on the same line with raw_input

I need to write a program that reads values and then uses them to calculate areas of different geometric shapes. My problem is: how to enter data on the same line? Example: 3.0 4.0 2.0  followed by calculation on the next line How to write th...
asked by 26.02.2016 / 11:56
1
answer

How to compare two lists in Python?

I have two lists whose content refers to one file1.txt and the other one file2.txt , there are differences in the contents of the files and I want to search < only the data that is in file2.txt and is not in file1.txt , I do not care the oth...
asked by 16.02.2016 / 16:19
2
answers

Error: object of type 'float' has no len

I was debugging simple operations in the Python interpreter, and the following command made me curious: >>> b = 3.12; len(b) With the following error:    Traceback (most recent call last):       File "", line 1, in       Type...
asked by 05.01.2016 / 22:50
1
answer

Python Combat Game

I'm a beginner in programming and I'm trying to make a simple little game to apply my knowledge about conditionals, repetition and the Random module, but I'm having some semantic problems. My goal is to attack the monster with a random number...
asked by 08.02.2018 / 19:10
1
answer

Difference between "list (range (1, 10))" and "range (1, 10)"?

I asked this question here Formatting All the elements of a list in Python? . In one of the answers, @CiganoMorrisonMendez put the following excerpt: list(range(1, 10)) However, whenever I used Python , I used range(1, 10) Is...
asked by 28.10.2015 / 19:59