Skip to main content
Post Undeleted by Dennis
Post Deleted by user8777
I can't count.
Source Link
user8777
user8777

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

As an anonymous edit pointed out, you can do it in 2727 26 in Python 3:

input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

As an anonymous edit pointed out, you can do it in 27 in Python 3:

input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

As an anonymous edit pointed out, you can do it in 27 26 in Python 3:

input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.

added 108 characters in body
Source Link
user8777
user8777

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

As an anonymous edit pointed out, you can do it in 27 in Python 3:

input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

As an anonymous edit pointed out, you can do it in 27 in Python 3:

input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.

Source Link
user8777
user8777

#Python 2.7 - 30 (with terrible and unapologetic rule abuse)

raw_input().upper().swapcase()

I'm flagrantly abusing the rules here, but...

Important: you are NOT allowed to use a built-in function that converts the string (or just one character) to lowercase (such as ToLower() in .NET, strtolower() in PHP , ...)! You're allowed to use all other built-in functions, however.

This takes the strings and coverts it to upper case. Then in a very unrelated method call, it reverses the case of the string - so that any lower case letters become upper case letters... and swaps any upper case letters to lower case letters.