Questions tagged as 'python'

1
answer

Array multidimensional python

I have a series of data that I would like to organize by title, example; movies = [ 'movie': [ 'legenda' [ 'dub', 'leg', 'nac' ], 'time': [ 1, 2, 3, 4, 5 ] ] .... ] I've tried dict()...
asked by 12.09.2016 / 21:18
2
answers

How to add the result that is inside the Split function in python?

Input value: 6+5 Example: Within the variable data are the numbers ['6', '5'] , print (data).split('+') How do I print the sum of these values?     
asked by 21.09.2016 / 15:34
1
answer

Attribution of objects in Python

Can anyone tell me why in the first iteration the assignment retangulo=retangulo() works fine, but in the second it does not? This error appears in Pycharm:    is not callable Code: from MDvalidateDATA import validateDATA c...
asked by 04.09.2016 / 18:39
1
answer

Find the sum of the elements of an array

I was trying to create a code that created a square array of n sides and then added each side to find out what has the different sum, in the sum part I got half locked. I tried to make this code but it did not work. Can anyone help me? n...
asked by 27.08.2016 / 14:56
2
answers

Chained list: how to modify data from one list without changing others?

I have a for which generates a list of data list lista[[...], [...]] Within "daughter" lists, you may or may not have other lists lista[['dado11', 'dado12', [link1]],['dado21', 'dado22', [link2]] This data that I represented as a link...
asked by 11.11.2016 / 19:26
1
answer

Identify a person through rules (IA)

I need a system that identifies a person (exactly a person) through rules (in this case, habits of such a person) but my AI knowledge is very shallow. Is there any appropriate technique for this? Preferably, it is applicable in languages such as...
asked by 05.07.2016 / 00:24
1
answer

ImportError: can not import name patterns in django

The application in django was working normally until I was putting django-comments, I first installed it with setup.py that came along, I believe that this is what is causing the problem, then I put it together with the project folder and refere...
asked by 20.06.2016 / 23:13
1
answer

When I edit a spreadsheet with pyexcel it loses its appearance

Hello, when I try to add new values to a ods worksheet, it loses all its "style" and is left with values only. Follow the code: import pyexcel sheet = pyexcel.get_sheet(file_name="dados.ods") sheet.row += [0, 0, 0] sheet.save_as("examp...
asked by 16.06.2016 / 14:30
1
answer

how to find and change a specific line python?

I'm learning Python and I've been creating txt files, adding things and rewriting them but I have not been able to modify a specific line, how can I do that? and I also wanted to know how to find out what line a string specifies this, I can alre...
asked by 24.01.2017 / 06:14
1
answer

Visual Studio utf-8 error

I tried to use Visual Studio together with the tools for Python , but when I put: print("Hello World") and pressing F5 it runs smoothly. However, when boto: print("olá") it gives the following error: File "C:...
asked by 02.10.2016 / 02:05