Skip to main content
This is for the Strunk and White badge ;)
Source Link
Beta Decay
  • 23.6k
  • 9
  • 74
  • 169

Python, 91/92 67 bytes

This was fun!

Now I know about assert:

s='s=%r;assert len(s)==34;print(s%%s)';assert len(s)==34;print(s%s) 
s='s=%r;assert len(s)==34;print(s%%s)';assert len(s)==34;print(s%s) 

If a char from string is removed, assert error. I would have done this sooner had I known of this feature, assert.

Python, 91/92 67 bytes

This was fun!

Now I know about assert:

s='s=%r;assert len(s)==34;print(s%%s)';assert len(s)==34;print(s%s) 

If a char from string is removed, assert error. I would have done this sooner had I known of this feature, assert.

Python, 91/92 67 bytes

This was fun!

Now I know about assert:

s='s=%r;assert len(s)==34;print(s%%s)';assert len(s)==34;print(s%s) 

If a char from string is removed, assert error. I would have done this sooner had I known of this feature, assert.

deleted 284 characters in body
Source Link

Python, 91/9291/92 67 bytes

This was fun!

92 if you count trailing newline

I'm fairly sure this is correct. Please tell me if otherwiseNow I know about assert:

f=9*(5);s='f=9*(5);s=%r;print(int((1/(s='s=%r;assert len(s)-f)))*==34;print(s%%s))';print(int((1/(';assert len(s)-f)))*==34;print(s%s)) 

If a char from string is removed, div zero error. Others are syntax errors (nonmatched brackets, can't call int if a * is removed, operationassert error if int is removed, len takes one arg, ss does not exist, is a quote is removed, string doesn't work, = needed for variables, prin, rint, pint, etc. do not existI would have done this sooner had I known of this feature, etcassert.)

Python, 91/92 bytes

This was fun!

92 if you count trailing newline

I'm fairly sure this is correct. Please tell me if otherwise

f=9*(5);s='f=9*(5);s=%r;print(int((1/(len(s)-f)))*(s%%s))';print(int((1/(len(s)-f)))*(s%s)) 

If a char from string is removed, div zero error. Others are syntax errors (nonmatched brackets, can't call int if a * is removed, operation error if int is removed, len takes one arg, ss does not exist, is a quote is removed, string doesn't work, = needed for variables, prin, rint, pint, etc. do not exist, etc.)

Python, 91/92 67 bytes

This was fun!

Now I know about assert:

s='s=%r;assert len(s)==34;print(s%%s)';assert len(s)==34;print(s%s) 

If a char from string is removed, assert error. I would have done this sooner had I known of this feature, assert.

Source Link

Python, 91/92 bytes

This was fun!

92 if you count trailing newline

I'm fairly sure this is correct. Please tell me if otherwise

f=9*(5);s='f=9*(5);s=%r;print(int((1/(len(s)-f)))*(s%%s))';print(int((1/(len(s)-f)))*(s%s)) 

If a char from string is removed, div zero error. Others are syntax errors (nonmatched brackets, can't call int if a * is removed, operation error if int is removed, len takes one arg, ss does not exist, is a quote is removed, string doesn't work, = needed for variables, prin, rint, pint, etc. do not exist, etc.)