Questions tagged as 'python'

1
answer

How to display multiline text with format?

I'm trying for several consecutive lines with a single string along with the .format method, but I can not. a=input("digite algo; ") print("""contem maiusculos:{} contem: {}n\contem números: {} contem alfanumericos: {}""".format(a.i...
asked by 30.10.2017 / 18:46
2
answers

(Python) Sort lists without sort ()

How to sort a list without using sort ()? The code below is correct, but the teacher does not want you to use sort (). The code has the following statement: "Make a program that, when filling a list with 8 integers, stores it in ascending order....
asked by 04.11.2017 / 07:12
2
answers

Decode data in Base64

I'm working with metadata of an image extracted in Json format. One of these data is a base64 binary string . I have read in a documentation that these values are 16 bits . Is there any way I can decode them and send them to an array automatic...
asked by 05.11.2017 / 19:59
2
answers

How to use comma in Python instead of dot

The Brazilian system, unlike the American system, uses the comma to separate decimals, but as Python was done in a country that uses the decimal point, programs, when we use the print , use points. How do I use comma instead? As for example:...
asked by 20.07.2017 / 16:47
2
answers

Manipulating Strings in Python

I have a list with n strings. Example: lista = ['0004434-48.2010', 'UNIÃO, '(30 dias úteis) 03/07/2017', '13/07/2017', '0008767-77.2013', 'UNIÃO, '(10 dias úteis) 03/07/2017', '13/07/2017'] My program runs through this list, however...
asked by 12.07.2017 / 22:37
3
answers

Numbers above 32, 64 bits

How to work with numbers above 32, 64 bits? The idea is to generate a large pseudorandom numbers up to 4096, for example, by a pseudorandom number generator that generates numbers of 32. In C I could allocate a corresponding space, working an...
asked by 14.04.2018 / 23:42
2
answers

Recursive function with strings - Python

I can not solve an exercise. The statement is as follows: Implement the uncomfortable (n) function that returns a string containing "bother" (the word followed by a space) n times. If n is not a strictly positive integer, the function should ret...
asked by 28.05.2017 / 03:12
1
answer

Python administrator privileges [closed]

Is there any way or command to run a Python script with admin privileges?     
asked by 02.01.2017 / 18:19
2
answers

Incorrect value conversion in python

I have a crawler that takes the value STRING $ 560,000.00 . I need to convert this value to FLOAT because I will use this value to perform queries of this type: Selecionar todos os carros com o valor entre 100000 até 560000 I am con...
asked by 03.01.2017 / 15:08
1
answer

Error in registering

Well, I'm a beginner in python, I was trying to make a basic login / login system. However I have been a problem in creating accounts, accounts are created in the database normally, but I can only log in with the first account created, the other...
asked by 07.02.2017 / 03:54