• 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
Opening_Introduction Avatar
Name:Trung Vo
Clan:ThienX Aerospace, Inc.
Skills:python, javascript, html5, css3, linux, bash, pygame, django
Member Since:Jul 2018
Last Seen:Jul 2025
Profiles:
Following:1
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (16)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Mythic_Blade
    • commented on "Remove First and Last Character" python solution
    • 9 months ago

    bro you didnt read the last line of the code

  • Custom User Avatar
    • nashblaster
    • commented on "Remove First and Last Character" python solution
    • 3 years ago

    Ahh, the default case was the icing on top.

  • Custom User Avatar
    • Chrono79
    • commented on "Friend or Foe?" kata
    • 3 years ago

    Please mark your post as having spoiler content next time.

    If a name has exactly 4 letters in it

    See your code again.

  • Custom User Avatar
    • Lawny01
    • commented on "Friend or Foe?" kata
    • 3 years ago

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

  • Custom User Avatar
    • Ulin
    • commented on "Sort and Star" python solution
    • 3 years ago

    It sorts by the ASCII values as it says in the description. Here's a link for more info
    http://support.ecisolutions.com/doc-ddms/help/reportsmenu/ascii_sort_order_chart.htm

  • Custom User Avatar
    • Isaac-hx
    • commented on "Remove First and Last Character" python solution
    • 5 years ago

    yeah lol

  • Custom User Avatar
    • versicolor
    • commented on "Remove First and Last Character" python solution
    • 5 years ago

    Nice one. :-)

  • Custom User Avatar
    • rowcased
    • commented on "Quarter of the year" kata
    • 5 years ago

    Can you elaborate?

  • Custom User Avatar
    • user5275226
    • commented on "Sort and Star" python solution
    • 7 years ago

    i think that it uses the same logic behind sorting an array of strings.

  • Custom User Avatar
    • magicalpopcorn
    • commented on "Remove First and Last Character" python solution
    • 7 years ago

    he alsolutely joked, don't take it seriously guys xD

  • Custom User Avatar
    • daumebtb
    • commented on "Remove First and Last Character" python solution
    • 7 years ago

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

  • Custom User Avatar
    • Hijinko
    • commented on "Remove First and Last Character" python solution
    • 7 years ago

    It works for other cases because of the final else clause. The else is really all that is required for the program to work.

  • Custom User Avatar
    • Chrono79
    • commented on "Friend or Foe?" kata
    • 7 years ago

    Mark your post as having spoiler content when it does (already did it for you this time).
    Write print(friend) in the line below your for loop line (above the if), you'll see you're skipping values as I said.
    There are some other problems with your code, like trying to get the length of a number instead of the length of the string.

  • Custom User Avatar
    • Chrono79
    • commented on "Friend or Foe?" kata
    • 7 years ago

    That's not true, you could generate a new list instead of mutating the input value. In many languages where it exists, filter method returns a new array/list.
    Your problem could be one of these:

    • You mutate the list you're using in the loop, then you skip some values because the index of the loop is incremented anyway (I think this may be your case).
    • The mutated list is used after passing by your function and expected values are calculated using it instead of the original list (not very likely here).

    That's in general, I don't know if these apply to your case here.
    Without actually seeing your code I can't say if it's one of these or another problem.

  • Custom User Avatar
    • Chrono79
    • commented on "Friend or Foe?" kata
    • 7 years ago

    remove mutates the list, check if you're not skipping values like that, or if mutating the list changes the expected results.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...