Ad
  • Default User Avatar

    Hello mate! you can check if a word is a palindrome by turning the word around with slices, and then comparing it to the original word, like this:
    if string == string[::-1]
    print('This word is a palindrome!')

  • Custom User Avatar

    PEP 8

    Always surround these binary operators with a single space on either side: assignment (=), augmented assignment (+=, -= etc.), comparisons (==, <, >, !=, <>, <=, >=, in, not in, is, is not), Booleans (and, or, not).