Skip to main content
fixed summary
Source Link
Taku
  • 37
  • 5

Python, 88 81 78 7877 bytes

actually reads the file

[edit] got it to 81 characters. [edit] got it to 78 chars ...by renaming the file to 'a' :)

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'a' is the file executed.

importfrom string import*
for c in string.printable:
    if c not in open('a').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

[edit] trimmed one more char, thanks for the tip!

Python, 88 81 78

actually reads the file

[edit] got it to 81 characters. [edit] got it to 78 chars ...by renaming the file to 'a' :)

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'a' is the file executed.

import string
for c in string.printable:
    if c not in open('a').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

Python, 88 81 78 77 bytes

actually reads the file

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'a' is the file executed.

from string import*
for c in printable:
    if c not in open('a').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

[edit] trimmed one more char, thanks for the tip!

shortened the source code
Source Link
Taku
  • 37
  • 5

Python, 88 81 8178

actually reads the file

[edit] got it to 81 characters. [edit] got it to 78 chars ...by renaming the file to 'a' :)

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'i.py''a' is the file executed.

import string
for c in string.printable:
    if c not in open('i.py''a').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

Python, 88 81

actually reads the file

[edit] got it to 81 characters.

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'i.py' is the file executed.

import string
for c in string.printable:
    if c not in open('i.py').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

Python, 88 81 78

actually reads the file

[edit] got it to 81 characters. [edit] got it to 78 chars ...by renaming the file to 'a' :)

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'a' is the file executed.

import string
for c in string.printable:
    if c not in open('a').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

added 167 characters in body
Source Link
Taku
  • 37
  • 5

Python, 8888 81

actually reads the file

[edit] got it to 81 characters.

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'i.py' is the file executed.

import string
f=open('i.py').read()
for c in string.printable:
    if c not in fopen('i.py').read():
        print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

Python, 88

actually reads the file

I tried to do it the 'clean' way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'i.py' is the file executed.

import string
f=open('i.py').read()
for c in string.printable:
    if c not in f:
        print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses), but I wanted to do explicitly what was asked :]

Python, 88 81

actually reads the file

[edit] got it to 81 characters.

I tried to do it the 'clean' (as in 'easy to read') way, turned out quite nice, although i'm still new to python and probably this can be shortened as well.

file named 'i.py' is the file executed.

import string
for c in string.printable:
    if c not in open('i.py').read():print c

And it prints out all the ASCII characters not found in source file. I know this was supposed to be a clever hack (as in all those which contain all the ascii set or addresses, or use an error), but I wanted to do explicitly what was asked :]

Anyone has a suggestion how to make it even shorter while still going in this direction?

fixed summary
Source Link
Taku
  • 37
  • 5
Loading
Source Link
Taku
  • 37
  • 5
Loading