3 ms·
That depends on the type of strings you are comparing. If you include the full Unicode set, you're going to run in to huge troubles in probably all languages si
by zo1 11y ago
That depends on the type of strings you are comparing. If you include the full Unicode set, you're going to run in to huge troubles in probably all languages simply due to the nature of the Unicode character set, rather than the specific language's handling of strings and Unicode code points.
But, personally, if you're teaching Python to a class, whether it's 2.x or 3.x. You should probably stick to using some variation of string.upper() == string.upper() to explain simple comparisons, due to simplicity.