time module in python
import time
t=time.localtime() #.localtime returns struct.time tuple and unformatted time
tg=time.gmtime()
print(time.asctime(t)) #.asctime converts tuple into formatted time string
print(time.localtime())
print(time.asctime(tg))
join function in python
list1=["one","two","three","four","five","six","seven","eight","nine","ten"]
var=" and ".join(list1) #join all members with and prefixed
print(var)
Comments
Post a Comment