Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Fourtwenty.py

DZone's Guide to

Fourtwenty.py

·
Free Resource
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:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}