• 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
mmib Avatar
Name:Unknown
Clan:Unknown
Member Since:Jan 2021
Last Seen:Nov 2024
Profiles:
    Following:0
    Followers:0
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations
    • Replies (27)
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • mauro-1
      • commented on "Sequence classifier" python solution
      • 2 years ago

      He traverses the entire array at most one time.

      This solution is faster than your solution: random tests in 390ms vs 450ms.

    • Custom User Avatar
      • Fuzzi
      • commented on "Keyboard handler" kata
      • 3 years ago

      Can confirm that caps lock on european keyboard behaves like permanently pressing shift key. This means caps lock and shift key at once negate each other.

      The description should say "caps lock only matters to letters". From the tests we only know it doesn't apply to numbers but have to find out ourselves about special characters like comma or apostrophe.

    • Custom User Avatar
      • user9015794
      • commented on "num to str" kumite
      • 3 years ago

      isn't it already a list?

    • Custom User Avatar
      • Tommyb841
      • commented on "Function 1 - hello world" python solution
      • 3 years ago

      I laughed too hard at this my face hurts

    • Custom User Avatar
      • bouchert
      • commented on "Doors in the school" python solution
      • 3 years ago

      Interestingly, the site groups code that imports outside the function with code that imports inside the function. Check the variations and you'll see. It just happened to choose the one with the import inside as the canonical version for some reason.

      For the most part, you are right. PEP 8 recommends only importing at the top of a file. Doing otherwise makes debugging much harder. However, technically there might be very rare situations where you might want to import inside of a function -- if only that function ever needs that module, the function is rarely or never called, and you don't want to pollute the global namespace, or if you want to defer and handle ImportError exceptions on a case-by-case basis, or you want to do some sort of conditional import depending on the passed parameters. Some others say they use it to resolve circular dependency issues, but that can almost always be avoided with a little restructuring of the affected files without the overhead a local import would involve.

    • Custom User Avatar
      • anter69
      • commented on "Reverse polish notation calculator" python solution
      • 3 years ago

      bad testing

    • Custom User Avatar
      • akar-0
      • commented on "Sequence classifier" python solution
      • 3 years ago

      No.

    • Custom User Avatar
      • e_nevisande
      • commented on "A Gift Well Spent" python solution
      • 3 years ago

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

    • Custom User Avatar
      • lechevalier
      • commented on "Simple arithmetic progression" python solution
      • 3 years ago

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

    • Custom User Avatar
      • Murhaf-Mo
      • commented on "Function 1 - hello world" python solution
      • 3 years ago

      Duh

    • Custom User Avatar
      • lechevalier
      • commented on "Last digits of N^2 == N" python solution
      • 4 years ago

      Just because I wanted to code golf it - aka having the shortest solution ;)
      Here is the ungolfed version

    • Custom User Avatar
      • lechevalier
      • commented on "Last digits of N^2 == N" python solution
      • 4 years ago

      I've used the fact you mentioned to golf this kata.
      This solution is 300% faster than this one (5000 elements are generated with [5]*3000)

    • Custom User Avatar
      • g964
      • resolved an issue on "A Rule of Divisibility by 7" kata
      • 4 years ago

      There is no specific instruction for Python. The description is (almost) language agnostic but it nevertheless says:

      Your task is to return to the function seven(m) (m integer >= 0) an array (or a pair, depending on the language)...

      Maybe a pair is not exactly a tuple but you could (should?) have seen the Sample tests:

      test.assert_equals(seven(1603), (7, 2))
      ...
      ...
      

      I don't consider that as an issue and I am very sorry for your first try though it wouldn't have given you more points:-)

    • Custom User Avatar
      • user1430804
      • commented on "Triple Crown" python solution
      • 4 years ago

      Right. Sorry for this. I am still at learning stage.

    • Custom User Avatar
      • user1430804
      • commented on "Triple Crown" python solution
      • 4 years ago

      What does it mean?

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...