• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
siebenschlaefer Avatar
Name:Matthias Rahlf
Clan:jambit GmbH
Member Since:Mar 2016
Last Seen:May 2025
Profiles:
Following:19
Followers:152
Allies:8
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (2168)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • CVPhelan
    • commented on "Get the Middle Character" python solution
    • 7 days ago

    So what I was missing (and that other guy's explanation fails to explain) is that when slicing a string to return a substring the : denotes a start and end point. s[] doesn't JUST return a specific indice. You can use it to return a substring from a starting indice to an ending indice. What the other guy is explaining is that the math works out so that on an odd string the equations on both sides of the : return the same number, so a string with 11 characters would be sliced starting at the 5th (starting from 0) indice and ending at the 5th indice. And even string length returns two different indices, so the one liner works.

    I had to look this up, his explanation did not make sense to me at first either, and frankly I will always pefer easily readable functions to one liners like this in actual production.

  • Custom User Avatar
    • bloom.exe
    • commented on "Create Phone Number" python solution
    • 13 days ago

    As a new python developer, this solution helped me immensely. Thank you.

  • Custom User Avatar
    • Hamzeh Aljwade
    • commented on "Odd Not Prime" cpp solution
    • 19 days ago

    well i don't know what to says from a practical stand point it is faster but from do you really wanna do it in your code like that and hard code it i don't think so

  • Custom User Avatar
    • ZeroDarkHardy
    • commented on "Keypad horror" python solution
    • 21 days ago

    Very clever! Good catch that you didn't need to translate '456', as their position remains the same.

  • Custom User Avatar
    • elton2003
    • commented on "Create Phone Number" python solution
    • 28 days ago

    Hi I'm new here and i need someone to guide me in coding

  • Custom User Avatar
    • rezanadian
    • commented on "Create Phone Number" python solution
    • last month

    nice

  • Custom User Avatar
    • trashy_incel
    • resolved a suggestion on "Esoteric Language: 'Poohbear' Interpreter" kata
    • last month

    escalated here as an issue

  • Custom User Avatar
    • siebenschlaefer
    • commented on "Get the Middle Character" python solution
    • 2 months ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • Dhruv_codewars
    • commented on "Get the Middle Character" python solution
    • 2 months ago

    how does it determing that the string is odd or even and which output to give

  • Custom User Avatar
    • mauro-1
    • commented on ""Risk (Game) : Battle Outcome" Python Translation"
    • 2 months ago
    • python 3.11
    • new test framework
    • immune to input modification
  • Custom User Avatar
    • domjweb
    • commented on "Basic variable assignment" python solution
    • 2 months ago

    best answer

  • Custom User Avatar
    • Nomenaaa
    • commented on "Twice as old" python solution
    • 2 months ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • donnirz
    • commented on "Train your skills in creation of classes." cpp solution
    • 3 months ago

    nah, amazing , i did it in like 100 lines of code.

  • Custom User Avatar
    • Ayelis
    • commented on "PaginationHelper" javascript solution
    • 3 months ago

    Good catch, just grabbing the .length of collection! Reduces the memory usage to constant space complexity. :+1:

  • Custom User Avatar
    • Barbhere
    • commented on "Create Phone Number" python solution
    • 3 months ago

    wow, the well deserved 6006 clever vote!

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...