Ad
Fundamentals
Strings
Data Types
Algorithms
Logic

A few less spaces...

Code
Diff
  • palindrome=lambda w:str(w)==str(w)[::-1]
    
    • palindrome = lambda w: str(w)==str(w)[::-1]
    • palindrome=lambda w:str(w)==str(w)[::-1]

The function is condensed down to one line using ES6 arrow functions

Code
Diff
  • findMax=arr=>Math.max(...arr)
    
    • function findMax(arr){
    • return Math.max(...arr);
    • }
    • findMax=arr=>Math.max(...arr)