Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib.request import* # importing all from urllib.request and using urlopen directly is shorter than importing urllib.request and getting urlopen with urllib.request.urlopen
- try:print(bool(urlopen(input()))) # no lambda necessary; just pass input straight to the function. also, input() is shorter than sys.argv[1] and importing sys, and int() is not neccessary, as booleans are allowed as output. finally, try statements can be in one line
- except:print(0) # except statements can be in one line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement