• 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
Bladedrinks Avatar
Name:Blade
Clan:Unknown
Skills:i speak gibberish.
Member Since:Apr 2019
Last Seen:Oct 2019
Profiles:
Following:2
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (12)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • PythonNoob808
    • commented on "Vowel Count" python solution
    • 4 years ago

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

  • Custom User Avatar
    • OQth
    • commented on "Alternating between three values" python solution
    • 6 years ago

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

  • Custom User Avatar
    • Bladedrinks
    • commented on "Alternating between three values" python solution
    • 6 years ago

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

  • Custom User Avatar
    • Bladedrinks
    • commented on "kgashok's fork of OQth's Python solution for "Alternating between three values"" kumite
    • 6 years ago

    Hi, kgashok
    The way you name the keyword arguments might kind of confuse the reader,
    since conventionlly we name keyword arguments using the word 'kwargs' in
    order to avoid confusion with 'args', which is actually short for '(positional) arguments'.

    For more information on how to name parameters with the ** sign, see:
    http://book.pythontips.com/en/latest/args_and_kwargs.html

  • Custom User Avatar
    • Bladedrinks
    • commented on "Alternating between three values" python solution
    • 6 years ago

    Thanks a lot for your generic solution, which is really really impressive.
    I learned a lot from it. And for the sake of my understanding, I added some comments to your source code.

  • Custom User Avatar
    • Blind4Basics
    • commented on "Alternating between three values" python solution
    • 6 years ago

    yes, that's it. For instance, here is what it could look like, having a generic solution.

  • Custom User Avatar
    • Bladedrinks
    • commented on "Alternating between three values" python solution
    • 6 years ago

    Thank you for your reply.

    Are you sure that '3' comes from the number of arguments?

    Well, I think you might've meant the number of parameters except 'x', which is also the length of
    the list containing a, b, c, etc., right?

    And I should've said, "Before replacing '3' with 'len(l)', you have to manually type in as many parameters as you want."

  • Custom User Avatar
    • Blind4Basics
    • commented on "Alternating between three values" python solution
    • 6 years ago

    that won't be more generic since the 3 comes from the number of arguments. ;p
    And if you make it more genrice with any number of values, this will become especially inefficient because of index.

  • Custom User Avatar
    • Bladedrinks
    • commented on "Alternating between three values" python solution
    • 6 years ago

    Very impressive!
    You also inspired me!
    To make it more generic, we can replace '3' with len(l).

  • Custom User Avatar
    • Bladedrinks
    • commented on "Thinkful - Dictionary drills: Order filler" python solution
    • 6 years ago

    A clever solution.

    This solution would be much better if the .keys() part could be left off,
    since calling the dict.keys() method is unnecessary.

    if merch not in stock, which could do the same thing as if merch not in stock.keys()

  • Custom User Avatar
    • Bladedrinks
    • commented on "Thinkful - Dictionary drills: Order filler" python solution
    • 6 years ago

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

  • Custom User Avatar
    • Bladedrinks
    • commented on "Vowel Count" python solution
    • 6 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...