Over a million developers have joined DZone.

Fourtwenty.py

·
stupid simple python script for checking to see whether or not it's currently either 16:20 or 4:20 for whatever reason you'd ever want to do that


#!/usr/bin/env python

# stupid simple python script for checking to see 
# whether or not it's currently either 16:20 or 4:20 
# for whatever reason you'd ever want to do that

import sys, os
import time

dt = list(time.localtime())
hour = dt[3]
minute = dt[4]
if hour == 4 or 16 and minute == 20:
	print ""
	print "OHHHH YEAH SON LET'S SMOKE SOME SHIT"
else: 
	print ""
	print "NOT YET SON"
	print "the time is only",minute,"after",hour,"o'clock"
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}