When creating some basic programs in Python, I occasionally run into errors that bring the word traceback , so I was curious to find out what traceback meant.
I'm starting a crawler project and the idea is to download all content from a particular website. It already has some "usable" features. What is killing me is, I am doing it multithread, however the threads in a moment stop and I do not know h...
I've created a list:
usuarios = ['123\n','123\n4']
I tried to convert index 0 to integer using int()
int(usuarios[0])
Result:
123
But when I tried to do the same with index 1:
int(usuarios[1])
result:
ValueError:...
I've learned that in Python , to loop% with for , from 1 to 10, we use range .
More or less like this:
for i in range(1, 10):
print(i)
Generally, in other languages, when we need to do a simple increment, we use the...
In R we can make a function return more than one object through a list. But how do you assign these objects to two different variables?
Example:
f<-function(){
primeiro<-1:10
segundo<-11:21
return (list(primeiro,segundo))
}...
How does it work if there are two (+) return in a Python function? Would you like to return the second value, or just the first one?
Example:
def soma(a, b):
x = a + b
y = 'qualquer coisa'
return x
return y
I'm having trouble receiving JSON data in PHP to save to the database, and this data is sent from a python script , I already tried json_decode using the $_REQUEST variable, but without success, when I write to a .txt I can...
I'm new to programming but there's one thing I do not understand. What is the class in Python?
Because it seems to me that with function I can do everything without using class . I already ran the net, but I did not find anything...