Questions tagged as 'python'

1
answer

Why are the characters in the string being printed as integers?

I have to parse an excerpt of code and explain its operation, but I can not figure out the output: Code: word_norm = 'mundo'.encode("utf8").lower() for idx, value in enumerate(word_norm): print(idx, value); Output 0 109 1 117 2 11...
asked by 31.01.2018 / 22:03
1
answer

Sort an alphanumeric list by number

For study purposes, I have the following problem:    A list with grocery shopping with descriptions and values, you need to order more and more without losing the description. Note: To sort the items I have to create the functions, I can...
asked by 04.06.2018 / 15:11
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

What is the most up-to-date zip code database? [duplicate]

My manager introduced me to following product from the Post Office , which states:    The e-DNE is a database that contains more than 900,000 Zip Code   Brazil, consisting of addressing elements (description of   neighborhoods, municipalit...
asked by 28.03.2014 / 22:24
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
2
answers

UnitTest Django Views: I can not login to the system by unittest [closed]

I need to give post in my view of "creation of requests", but when I try to give post , I'm redirected to my login screen, I'm trying to login to the system and then give the post in that view , but I did not succeed. Could someone...
asked by 26.02.2014 / 15:44
1
answer

Elaborate a program to read a template with ten objective questions python [closed]

Develop a program to read a template with ten objective questions provided as a string with ten characters relative to the correct alternatives (each response is indicated by 'A' or 'a', 'B' or 'b', 'C' or 'c', 'D' or 'd' or 'E' or 'e'). Example...
asked by 29.11.2018 / 13:49
1
answer

Create a function that reads a list correctly

This function should ask for a name to be used as a search term. If the searched film is in the list, all the movie. Otherwise, a message that is not in the list should be shown. This is the function I created to try to resolve the issue but...
asked by 16.11.2018 / 01:34
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

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