import time time1 = raw_input("Please input time1:") time2 = raw_input("Please input time2:") timeStamp1 = int(time.mktime(time.strptime(time1,"%Y-%m-%d"))) timeStamp2 = int(time.mktime(time.strptime(time2,"%Y-%m-%d"))) diff = abs(timeStamp1 - timeStamp2) print diff/24/60/60
I go home with my surface in this hoilday.it’s convenient because his simplification.
Howover,that is all why i am sad today.
Compare two version numbers version1 and version2.
If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0.
You may assume that the version strings are non-empty and contain only digits and the
. character does not represent a decimal point and is used to separate number sequences. Continue reading
Write a bash script to calculate the frequency of each word in a text file
For simplicity sake, you may assume:
words.txtcontains only lowercase characters and space
Each word must consist of lowercase characters only.
Words are separated by one or more whitespace characters.