Skip to main content
added 272 characters in body
Source Link

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5 4):

(thanks Claudiu)

"string"in["string"] 

original:

"string" in["string"] 

Alternative Alternative Alternative Bendy-ruly Python (2):

"string"is"string" 

Nothing was said about comparison keywords (This is not a serious submission, just something that occurred to me...)

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5 4):

(thanks Claudiu)

"string"in["string"] 

original:

"string" in["string"] 

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5 4):

(thanks Claudiu)

"string"in["string"] 

original:

"string" in["string"] 

Alternative Alternative Alternative Bendy-ruly Python (2):

"string"is"string" 

Nothing was said about comparison keywords (This is not a serious submission, just something that occurred to me...)

added 27 characters in body
Source Link

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (55 4):

(thanks Claudiu)

"string"in["string"] 

original:

"string" in["string"] 

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5):

"string" in["string"] 

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5 4):

(thanks Claudiu)

"string"in["string"] 

original:

"string" in["string"] 
added 313 characters in body
Source Link

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternatively: (8 7)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5):

"string" in["string"] 

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternatively: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

Python (17 11):

b in a in b 

(Checks if b is contained in a and a is contained in b, if that wasn't clear from the code.)

Alternative python: (8 7)

derived from Tom Verelst's Go solution:

b in[a] 

Bonus: this works for any type.

EDIT:

Wait a second, just read that you can also directly program in the strings, and don't have to count quotes... (or at least, that what golfscript does). So... Python on par with golfscript? Oh my!

Alternative alternative Python (5):

"string" in["string"] 
7 chars :D
Source Link
Loading
added 21 characters in body
Source Link
Loading
Added the second one.
Source Link
Loading
added 1 characters in body
Source Link
Loading
Source Link
Loading