I'm a beginner in sending emails through a script and I'm having a problem. Use Python 3.5. When sending attachments with the following script, they lose the extension and are renamed:
def enviaremail(usuario,senha,mensagem,listadestinatarios)...
def clinic():
print "Voce acabou de entrar na clinica!"
print "Voce entra pela porta a esquerda (left) ou a direita (right)?"
answer = raw_input("Digite left (esquerda) ou right (direita) e pressione 'Enter'.").lower()
if answer =...
In python it is possible to print various types of variables using print . Here's an example:
print(3.4, "hello", 45);
Or individually.
print(3.4);
print("hello");
print(45);
How can you identify whether the value being printed i...
How to convert a type date and a datetime to milliseconds?
>>> ontem # tipo date
datetime.date(2015, 9, 29)
>>> hoje # tipo datetime
datetime.datetime(2015, 9, 30, 18, 15, 36, 856736)
I noticed that in Python, when we have an object with the __str__ method, it is responsible for returning a string that represents the object - or something like that.
Example:
from uuid import uuid4
uuid4().__str__()
The output i...
I asked this question
And in the case of python ?
I can convert the string '1' str to 1 int .
Example:
1 + int('1') # Imprime: 2
However, if I try to convert '1 cachorro' str to int ...
int('1 c...
The program should read two strings and remove from the first string all the letters that occur in the second string. Example: Let the strings be "chocolate" and "hollow", so the program should print "hlte". How to solve the problem using string...
I need a function compara_listas(lista1, lista2) that receives two random lists and computes the sum of the difference between the elements of them. However, if any element of lista2 is greater than lista1 , it will become ne...
I'm using Python 3.6 to do a program in which the person types an MD5 hash, so the program saves the hash in a variable, reads a txt file and plays the contents inside a list, where each name separated by , is an item in that list.
Aft...
I would like you to help me with the following:
Given this
CGC UUC GCU UUG GAA AAU UUG UGU GUU UUU UGU GGC UGC UCG CUG CUC AAA UUG UUC GCU GCU UUU UGU GUC CUG GCU GCU UUU AUU AUU UUA CGC UGC UUG GCG CUG CUY UUA CGC UGC UUG GGC UUG UUG UGG C...