Ad
Fundamentals
Games
Code
Diff
  • def riddle(word):
        return len(word[:-1])
    • def riddle(word):
    • return len(word) - 1
    • return len(word[:-1])
Strings
Data Types
Iterators
Control Flow
Object-oriented Programming
Basic Language Features
Fundamentals
Programming Paradigms
Code
Diff
  • def removeEverySecond(string):
        return string[::2]
    • removeEverySecond = lambda string: string[::2]
    • def removeEverySecond(string):
    • return string[::2]