I wanted to create a class at runtime to do updates to databases, for example, but without being dependent on DBMS, instead using python and wondering if it's possible to create these classes at runtime.
I want to run the following script in Python through a web site on the server:
#!/Python34/python
from selenium import webdriver
driver=webdriver.Firefox()
driver.get("C:\wamp64\www\desenvol\index.html")
elem1 = driver.find_element_by_link_te...
I'm starting in python and always end up with some doubts in the beginning.
I need to know how to test if a list is empty.
As I always say, I come from PHP.
So I used to do these forms:
count($array) == 0
empty($array);...
Live.
I do not realize much or even nothing about predicting values. My problem is knowing how to predict future values of a certain variable based on a set of values previously noted ...
Do you know where I can find tutorials that explain...
I am a beginner in python and am having doubts about the use of list and tuple and their operators. I'm trying to print only the column of an array but I'm not getting it. I've tried to do the following to print the second column:
matriz = [[1...
I have the following text:
'box 1 is blue, box 10 is green, box 100 is empty'
I want to replace 'box 1' with 'package 2', so I do:
>>> texto = 'caixa 1 é azul, caixa 10 está verde, caixa 100 está vazia'
>>> print(te...
I'm starting in Python and I'm coming from PHP .
To convert a string to base 64 in PHP, I do it as follows:
base64_encode('stack overflow'); //c3RhY2sgb3ZlcmZsb3c=
And in Python , how do I do this?
When I try to give print(6/10) I get a int (0) instead of a float (0.6)
And if I give type(6/10) it returns int .
I'm following this tutorial and doing exactly the same steps both in pyCharm and in IDLE,...
I'd like to get a better understanding of the @classmethod annotation of Python.
Briefly, it works as a second constructor alternative. But what are the benefits? When to use?
@classmethod
def from_teste(cls, teste):
How does cls...
I'm trying to validate a simple form in Python 3 and I want to prevent it from registering the information if the nome field is empty, but when I make a if to check that the name variable is empty, it it returns me that it i...