• 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
JasonBrack Avatar
Name:Unknown
Clan:Unknown
Member Since:Jan 2021
Last Seen:Jun 2025
Profiles:
    Following:0
    Followers:2
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (15)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • lechevalier
      • commented on "Nesting Structure Comparison" python solution
      • 14 months ago

      Just keep in mind the following:

      3 == 3 == 3
      >>> True
      
      # Not equivalent to
      (3 == 3) == 3
      >>> False
      
      # Equivalent to
      3 == 3 and 3 == 3
      >>> True
      
    • Custom User Avatar
      • chriscarrollsmith
      • commented on "Nesting Structure Comparison" python solution
      • 14 months ago

      Nice. I've seen the chained comparators with inequalities, but not equalities. Now that I see it, it's obvious that it would work. Just never thought of it before.

    • Custom User Avatar
      • elenakrittik
      • commented on "Nesting Structure Comparison" python solution
      • 2 years ago

      Does this map avoid recursion? If so, clever and practical idea!

    • Custom User Avatar
      • lechevalier
      • commented on "Nesting Structure Comparison" python solution
      • 2 years ago

      Indeed that is a common pitfall.
      I am surprised noone mentioned it before, thank you!

    • Custom User Avatar
      • deejcunningham
      • commented on "Nesting Structure Comparison" python solution
      • 2 years ago

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

    • Custom User Avatar
      • adbiLenLa
      • commented on "The Sum Of The Prime Factors Of a Number... What For?" python solution
      • 3 years ago

      i did not know about the global variables in python.

      your solution is very interesting.

      #11b3b/3qh:0z:vV

    • Custom User Avatar
      • lechevalier
      • commented on "Nesting Structure Comparison" python solution
      • 3 years ago

      You're welcome ;-)

    • Custom User Avatar
      • mumei00
      • commented on "Nesting Structure Comparison" python solution
      • 3 years ago

      I had the same problem but it finally worked out. good job lechevalier,thanks, I am learning new things.

    • Custom User Avatar
      • lechevalier
      • commented on "Nesting Structure Comparison" python solution
      • 4 years ago

      same_structure_as([1,'[',']'],['[',']',1]) returns True in Python 3.6 and Python 3.8 - the versions available on CW.
      No reason to return anything else in other Python versions.

    • Custom User Avatar
      • freestyletime
      • commented on "Nesting Structure Comparison" python solution
      • 4 years ago

      Hi, the same_structure_as([1,'[',']'],['[',']',1]) results to a False when I use your solution.

      Python 3.7.3

    • Custom User Avatar
      • JasonBrack
      • commented on "n-Bonacci Ratio" kata
      • 4 years ago

      Edited

    • Custom User Avatar
      • JasonBrack
      • commented on "Crouching Distribution, Hidden Constant" kata
      • 4 years ago

      Thanks. That worked.

    • Custom User Avatar
      • rge123
      • created an issue for "Crouching Distribution, Hidden Constant" kata
      • 4 years ago

      needs python 3.8

    • Custom User Avatar
      • rge123
      • commented on "Crouching Distribution, Hidden Constant" kata
      • 4 years ago

      just hit attempt - sample tests are broken for now

    • Custom User Avatar
      • JasonBrack
      • commented on "Crouching Distribution, Hidden Constant" kata
      • 4 years ago

      Using Python 3.6 I get:

      STDERR:
      Traceback (most recent call last):
      File "main.py", line 3, in
      import codewars_test as test
      ModuleNotFoundError: No module named 'codewars_test'

    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...