Posts by Marcio • 95 points
9 posts
-
3
votes3
answers2829
viewsA: Accent error on Visual Studio output
Follow below in detail what worked. This is to edit Settings.json and in code-Runner.executorMap, add the following lines: "code-runner.executorMap": { "python": "set PYTHONIOENCODING=utf8…
-
4
votes3
answers2829
viewsQ: Accent error on Visual Studio output
print('Olá Python!) Here is some information about setting up my PC. Windows 10 Pro Cmder Active code page: 850…
-
0
votes3
answers191
viewsA: How to create a dictionary with a word and its adjacent from a string?
I got it that way too. texto = "We are not what we should be We are not what we need to be But at least we are not what we used to be" lista = texto.lower().split() dic = {} for i in…
-
0
votes3
answers191
viewsQ: How to create a dictionary with a word and its adjacent from a string?
I have the following string: texto = "We are not what we should be We are not what we need to be But at least we are not what we used to be" This would be the return I wanted: for every word…
-
1
votes1
answer38
viewsA: Heroku Login Error: Cannot read Property 'body' of Undefined
An update came out that solves the problem. On Github, the jdxcode that is a member of Heroku, reported that the latest update (7.0.88) solves the problem by logging in. Just run the update.…
-
0
votes1
answer38
viewsQ: Heroku Login Error: Cannot read Property 'body' of Undefined
Hello! I am getting the following error when trying to log in. heroku login heroku: Enter your login credentials Email: ########@gmailTypeError: Cannot read property 'body' of undefined at new…
-
0
votes1
answer440
viewsQ: What should I change in Git for Git Bash to open in my project directory in windows 10?
I made the changes in the field (start at:) but it didn’t work. Any suggestions for this problem?…
-
0
votes3
answers3331
viewsA: Return the amount of elements repeated in a list
In a function it looks great! from collections import Counter def remove_dups(l1, l2): for x in l1: l2.append(x) if Counter(l1)[x] == 1: l1.remove(x) l1 = [1, 2, 1, 3, 4, 3] l2 = [] remove_dups(l1)…
-
0
votes1
answer76
viewsQ: How to get back the amount of an existing word within a.txt file?
I’m trying to get as a return the amount of low-level words (bad words) in one text, using as a basis another file . txt containing the words (bad words). The code I made only returns 1 (one)…