Questions tagged as 'python-3.x'

1
answer

How to make multiple prints on the same line in python 3? [duplicate]

I want to know how to make prints appear on the same line using python 3. Example: print('1') print('2') 1 2 I wanted when python was to start number 2, number one was deleted and number 2 was on the same line as 1 was before. I tried...
asked by 05.11.2018 / 16:57
1
answer

Tkinter Library is not recognized by Pycharm

I'm importing the Tkinter library into PyCharm, but PyCharm is not recognizing its features, not running and displaying error. I have attached the image of the error presented for help.     
asked by 04.01.2019 / 18:18
1
answer

How to get value from the first line of a Text (txt) file?

So ... As you can see, the variable target defines the email that the message will be sent to. However, I can not add the value of the first line of the list.txt within the variable target . The idea of a broader view is that...
asked by 05.12.2017 / 20:30
1
answer

Return an input that is inside a function

I have this code: bebidas = {'Suco de laranja': 5.99, 'Suco de uva': 5.99, 'Suco de açaí': 5.99, 'Coca Cola(lata)': 6.50, 'Vitamina': 7.50} salgados = {'Coxinha': 5.00, 'Pastel': 7.50, 'Hamburguer': 7.50} sobremesas = {'Sonho': 2.99,'Bolo de c...
asked by 22.11.2017 / 16:40
1
answer

Read fasta files in python and skip the first line

I need to read a fasta file, but I do not know how to delete the first line of the string , example: >sequence A ggtaagtcctctagtacaaacacccccaatattgtgatataattaaaattatattcatat tctgttgccagaaaaaacacttttaggctatattagagccatcttctttgaagcgttgtc...
asked by 11.09.2017 / 21:35
1
answer

How do I see how much the function returns Python

I made a script that returns me the names of online players of a given game Only I wanted to put the amount. How would this structure for quantity return be? I have already tried to create a list and with it use the len plus error function. im...
asked by 23.01.2018 / 20:37
1
answer

As per the items in a list in ascending or descending order?

I'm trying to get the numbers in a list in ascending order but the sort () method is putting the 10 and its multiples (20, 30) as being similar to itself divided by 10. For example, in the following code: numeros = ['1', '3', '2', '20', '4', '...
asked by 17.12.2017 / 03:21
1
answer

How do I write information on the same line without creating a new one?

I'm doing a program, and I want every time the value of the variable changes, it appears on the same line and not that I create new lines with the same content.     
asked by 02.03.2018 / 17:38
1
answer

How do I run a command once every hour in python?

I want to run a code / line of code once every hour when running the program in python, how do I run every hour?     
asked by 13.10.2018 / 22:56
1
answer

I want to scrape a page, but I can not get a text that has "& nbsp" in it

Well, the title says it all, I want to get the price of a product from link , which looks like this: / p> <span class="nm-price-value" itemprop="price">R$&nbsp;367,60</span> Using this code: import bs4 import requests def...
asked by 21.10.2018 / 17:13