• 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
stok Avatar
Name:Sean Tokunaga
Clan:Unknown
Member Since:Dec 2016
Last Seen:Jul 2023
Profiles:
Following:6
Followers:4
Allies:3
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (110)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • trashy_incel
    • commented on "Round by 0.5 steps" python solution
    • 2 months ago

    see the comments below. this solution was written in Pyrthon 2. Python 3 changed the round() function for halfway cases: it used to be half away from zero (0.5 --> 1, 1.5 --> 2), now it's half towards the nearest even integer (the so-called "banker's rounding"): (0.5 --> 0, 1.5 --> 2)

  • Custom User Avatar
    • _Maikha_
    • commented on "Round by 0.5 steps" python solution
    • 2 months ago

    How come when I did it it was incorrect????
    Which verion did you do?

  • Custom User Avatar
    • shreedave
    • commented on "String cleaning" python solution
    • 2 months ago

    Me too.

  • Custom User Avatar
    • CClairvoyant
    • commented on "String cleaning" python solution
    • 7 months ago

    Python doesn't have arrays and the code above isn't creating a list either. It's creating a generator and the creation specifically takes almost no resource, since the values are generated lazily.

    AFAIK the difference comes from the code above calling isdigit function a lot of times, whereas replace is only called 10 times. Keep in mind, that both of the functions are highly optimized and written in C, so that's why the the code with more function calls and more python is slower. That also for example causes some O(n^2) algorithms to run faster in python, than an O(n log n) alternative.

  • Custom User Avatar
    • ahmet_popaj
    • commented on "Euler method for numerical integration" kata
    • 12 months ago

    Nice mathy kata, perfect.

  • Custom User Avatar
    • ejini战神
    • resolved a suggestion on "Interweaving strings and removing digits" kata
    • 15 months ago

    Approved

  • Custom User Avatar
    • saudiGuy
    • created a suggestion for "Interweaving strings and removing digits" kata
    • 15 months ago

    python new test framework is required. updated in this fork

  • Custom User Avatar
    • saudiGuy
    • created an issue for "Rotational state populations (the Boltzmann distribution)" kata
    • 15 months ago

    This should not pass.

  • Custom User Avatar
    • saudiGuy
    • created an issue for "Rotational energy levels" kata
    • 17 months ago

    atleast python: no random tests

  • Custom User Avatar
    • saudiGuy
    • created a suggestion for "Euler method for numerical integration" kata
    • 2 years ago

    python new test framework is required. updated in this fork

  • Custom User Avatar
    • evan.kroz
    • commented on "String cleaning" python solution
    • 2 years ago

    yeah I used .isnumeric lol

  • Custom User Avatar
    • AbdallahSiyabi
    • commented on "Largest Square Inside A Circle" python solution
    • 2 years ago

    Thank you so much @stok

  • Custom User Avatar
    • WildRosesOW
    • commented on "String cleaning" python solution
    • 2 years ago

    Bc creatin new array is more time and resource consuming. Using regex is BP for this case. My advise for everyone: learn what is regix (import re) and how to use it

  • Custom User Avatar
    • dattenborg
    • commented on "Find the stray number" python solution
    • 2 years ago

    Yes!!!

  • Custom User Avatar
    • Cloud Walker
    • created a question for "Euler method for numerical integration" kata
    • 2 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...