Wednesday, 11 March 2020

Zip Function In Python

Zip function in python returns a new tuple object where the first element of the tuple will be the combination of the first element of each iterator passed and so on.

e.g. list1 = [1,2,3]
list2 = [4,5,6]

print(tuple(zip(list1,list2)))
output:

((1,4),(2,5),(3,6))

Sending email using Python

Python has provided smtplib library in order to send email. import smtplib #domain name for the smtp server and port number conn = smtplib.S...