String Case Convertion

  • Uppercase: Convert to uppercase using .upper() in Python, .toUpperCase() in JS
  • Lowercase: Convert to lowercase using .lower() in Python, .toLowerCase() in JS
print("hello".upper())
print("HELLO".lower())
HELLO
hello
%%js
console.log("hello".toUpperCase());
console.log("HELLO".toLowerCase());
<IPython.core.display.Javascript object>
  • Use Case: Useful for standardizing text inputs, like making email addresses case-insensitive