Questions tagged as 'python'

2
answers

How to create the tag! DOCTYPE html in Beautiful Soup (bs4)

I wanted to create the Beautiful Soup tag (bs4), and I developed the following: from bs4 import Doctype tag = Doctype('html') I did the above. But it does not create the tag. How to proceed?     
asked by 09.05.2018 / 16:30
1
answer

How to play a background audio?

I'm doing a python program that runs within an infinite loop .. Under certain conditions I need to play an audio, but I can not wait for the audio to finish to continue the process. I thought of something async, that is, while I'm running the...
asked by 31.05.2018 / 23:41
2
answers

how to compile a python script in an executable

What is the best way to compile a python script for an executable running on a linux (ubuntu), windows, and mac operating system.     
asked by 01.06.2018 / 03:48
4
answers

Identify missing value in numerical sequence

There is a set of cards numbered from 1 to N. Within this set a card was lost, determine the number of the lost card based on the remaining cards. Given an N number, followed by N-1 integer values representing the numbers of the remaining car...
asked by 16.05.2018 / 22:15
1
answer

Website with hidden HTML

I need to extract the sales data for new cars on some websites. One of the sites is the Locamerica company. However, on her site does not appear in the page HTML content that I need to extract. I need to extract the data of each car pres...
asked by 19.05.2018 / 23:29
1
answer

Formatting float types

I researched a little before asking, they know why it does not show 2,500 in the output, but 2.5 salario=float(input("Digite seu salario")) print(salario)     
asked by 01.05.2018 / 04:36
1
answer

What is the purpose of AS in Python?

Please help me regarding this. Please explain to me why, and how AS works in Python.     
asked by 17.04.2018 / 23:39
1
answer

look for given in a json python

I have the following code with open('states.json') as f: data = json.load(f)  for state in data["jquery"]: if(argumentos[2] == state['version']): print(state['name'], state['version'] + "existe") else: print("...
asked by 23.05.2018 / 20:15
2
answers

I need to make an entry in Python storing as a list, all in one line

I'm doubtful in a college exercise, I need to store 3 data which are: Vehicle number, kilometers rotated and consumption in each variable of type list, but due to being different types, with the first 2 being integers and the last float, besides...
asked by 24.05.2018 / 03:19
3
answers

Return the number of repeated elements in a list

Good morning, could you help me with a question? How do I return the amount of elements that are repeated in a list in python? For example: A list = [4,2,1,6,1,4,4] should return the value 2 because there are two elements that are repeated in th...
asked by 24.05.2018 / 17:41