• 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
iammrinal0 Avatar
Name:Mrinal Purohit
Clan:Unknown
Member Since:Jun 2015
Last Seen:Oct 2024
Profiles:
Following:5
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (45)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • AbFighter
    • commented on "Categorize New Member" python solution
    • 9 days ago

    same logic

  • Custom User Avatar
    • 11Rem
    • commented on "Categorize New Member" python solution
    • 7 months ago

    Complitly agryment!

  • Custom User Avatar
    • Raknos13
    • commented on "Categorize New Member" python solution
    • 2 years ago

    This is best practice rather than the one liner most popular answer because this is much more readable.

  • Custom User Avatar
    • Moralycz
    • commented on "Categorize New Member" python solution
    • 2 years ago

    The exact same thing i did rofl

  • Custom User Avatar
    • MadMan-28
    • commented on "Categorize New Member" python solution
    • 2 years ago

    your approach was unique

  • Custom User Avatar
    • MadMan-28
    • commented on "Categorize New Member" python solution
    • 2 years ago

    same here lol

  • Custom User Avatar
    • Joh4nCar
    • commented on "Categorize New Member" python solution
    • 2 years ago

    Practicly i had the same solution jajaja

  • Custom User Avatar
    • GitArco
    • commented on "Categorize New Member" python solution
    • 2 years ago

    I had a similar approach!

  • Custom User Avatar
    • classicpaul
    • commented on "Categorize New Member" python solution
    • 3 years ago

    same code with me :D

  • Custom User Avatar
    • AkashMV
    • commented on "Categorize New Member" python solution
    • 3 years ago

    are you sure that you gave the conditions correctly?

    The age is mentioned as atleast 55 ie >= 55.
    This is what caused the error in my first test run as one test value was (55,21).

  • Custom User Avatar
    • Anurag Dullur
    • commented on "Categorize New Member" python solution
    • 3 years ago

    i did the same but few of them passed rest didn't i don't know why

  • Custom User Avatar
    • MoniaJ
    • commented on "Categorize New Member" python solution
    • 4 years ago

    Hi JoshK.py!
    Yes, you are right. Dictionaries are different structures than lists.
    There are no key:value pairs in lists.
    Brdgs, MoniaJ

  • Custom User Avatar
    • bora399
    • commented on "Categorize New Member" python solution
    • 4 years ago

    Waow i did the same

  • Custom User Avatar
    • First_Kata
    • commented on "Categorize New Member" python solution
    • 5 years ago

    Hi Slysenko,

    Thank you very much!

    I think I totally get it now. Please become a Python professor!

    Thank you again,
    Josh

  • Custom User Avatar
    • slysenko
    • commented on "Categorize New Member" python solution
    • 5 years ago

    a list is a structure that contains a series of values of any type.
    if we have a list like [10, 20, 30, 40] the first element (as in all computer science) is an elemet #0
    so we start counting from 0 not from 1 as in regular life.
    if we need to get the first element of the array (list) we use arr[0] (arr is a name of the array/list)
    when we iterate over the array using the for loop we get each consecutive element of that array with each loop.
    for i in data means "take each element of data one at a time".
    so at loop 0 we take the 0th element and write its value to the variable i
    here each element of the data list is a list itself, i.e. the 0th element is equal to [18, 20]
    so i[0] means 18 and i[1] means 20. if we try to get the 2nd element of the list i we would encounter an error because there is no 2nd element in this array/list.
    using words like 'key' and 'value' in this case is a bit wrong.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...