• 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
javafreak Avatar
Name:Unknown
Clan:Unknown
Member Since:Dec 2014
Last Seen:Oct 2016
Profiles:
    Following:0
    Followers:18
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (347)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • strangercacaus
      • commented on "Does my number look big in this?" python solution
      • last month

      The most important thing here is the list comprehension (sum(int(x)) for x in str(value)

      It is nothing but a for loop, you will write hundreds of for loops until it just clicks that what you're trying to do is this essential form, and then it comes naturally.

      the more you see it the more obvious it gets

    • Custom User Avatar
      • alivsey87
      • commented on "Array.diff" python solution
      • last month

      same here LOL

    • Custom User Avatar
      • Jaqb77
      • commented on "Vowel Count" python solution
      • 2 months ago

      thats clever

    • Custom User Avatar
      • Barbhere
      • commented on "Array.diff" python solution
      • 3 months ago

      when using list comprehensions, if you have no else to add, you should use the if after the for not before it. I guess that's the reason
      try it yourself.

    • Custom User Avatar
      • Tom-Sawyer-123
      • commented on "Does my number look big in this?" python solution
      • 3 months ago

      This reply might make sense if you used modulo extraction to do it completely mathematically, but you used a method that is still O(n) in space complexity so the difference between your code and the given solution is barely different.

    • Custom User Avatar
      • Tom-Sawyer-123
      • commented on "Vowel Count" python solution
      • 3 months ago

      This isn't quite correct. That isn't a list expression, its a lazy generator. There is no intermediate list of 1s created, rather it yeilds a 1 each time it is requested by the sum function.

    • Custom User Avatar
      • smartguy74
      • commented on "Does my number look big in this?" python solution
      • 3 months ago

      I am still new to python but I wonder how does someone think about these one liner clean code, does it come after few iterations or they pop up just like that :)

    • Custom User Avatar
      • lcsmas
      • commented on "Does my number look big in this?" python solution
      • 4 months ago

      Personnaly I do it because it is fun to do. It also test my knowledge of a language and allow me to improve on this language.

      However, I avoid to do those kind of thing for professional code and always favor readable and easily understable code.

      Codewars is not real life project guys, it is fun to have those kind of solution upvoted, it show of what a language can do and help reader to improve, even if it should not be applied in a professional context !

    • Custom User Avatar
      • robertofmarins
      • commented on "Convert number to reversed array of digits" python solution
      • 4 months ago

      Perfect!

    • Custom User Avatar
      • pucio8
      • commented on "Array.diff" python solution
      • 4 months ago

      Useful when you want to learn 'not in' list

    • Custom User Avatar
      • code_jason
      • commented on "Array.diff" python solution
      • 4 months ago

      nice job

    • Custom User Avatar
      • Chrono79
      • commented on "Vowel Count" python solution
      • 4 months ago

      Short for letter?

    • Custom User Avatar
      • Tony Tony
      • commented on "Vowel Count" python solution
      • 4 months ago

      Can someone explain why all these 56++ persons all using same "let" as variable name? let in this code is not python reserver function but variable name.

    • Custom User Avatar
      • alePier
      • commented on "Convert number to reversed array of digits" python solution
      • 4 months ago

      Beautiful, simple and efficient.

    • Custom User Avatar
      • daubethrone
      • commented on "Array.diff" python solution
      • 5 months ago

      I tried this one but it kept asking me to add an else statement

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...