Skip to main content
import* thanks to NickT
Source Link
Chris H
  • 631
  • 3
  • 7

##Python 2.7, 7170 77 Bytes

importfrom urllib as limport*
a=1
try:l.urlopen('http://to.')
except:a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that. And another one for the "to." trick (confirmed to work with urllib), two for getting rid of the pesky indents.

##Python 2.7, 71 77 Bytes

import urllib as l
a=1
try:l.urlopen('http://to.')
except:a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that. And another one for the "to." trick (confirmed to work with urllib), two for getting rid of the pesky indents.

##Python 2.7, 70 77 Bytes

from urllib import*
a=1
try:urlopen('http://to.')
except:a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that. And another one for the "to." trick (confirmed to work with urllib), two for getting rid of the pesky indents.
another 3 bytes
Source Link
Chris H
  • 631
  • 3
  • 7

##Python 2.7, 7471 77 Bytes

import urllib as l
a=1
try:
 l.urlopen('http://ato.uk'')
except:
 a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that. And another one for the "to." trick (confirmed to work with urllib), two for getting rid of the pesky indents.

##Python 2.7, 74 77 Bytes

import urllib as l
a=1
try:
 l.urlopen('http://a.uk')
except:
 a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that.

##Python 2.7, 71 77 Bytes

import urllib as l
a=1
try:l.urlopen('http://to.')
except:a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that. And another one for the "to." trick (confirmed to work with urllib), two for getting rid of the pesky indents.
added 192 characters in body
Source Link
Chris H
  • 631
  • 3
  • 7

##Python 2.7, 7774 77 Bytes

import urllib as l
a=1
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 a=0
print 0a

Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company.

import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that.

##Python 2.7, 77 Bytes

import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0

Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company.

##Python 2.7, 74 77 Bytes

import urllib as l
a=1
try:
 l.urlopen('http://a.uk')
except:
 a=0
print a
import urllib as l
try: 
 l.urlopen('http://a.uk')
 print 1
except:
 print 0
Uses 1 for truthy, 0 for falsy. a.uk redirects to a motorbike clothing company. Saved 3 bytes by assigning to a variable and printing that.
Source Link
Chris H
  • 631
  • 3
  • 7
Loading