• 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
ollyfg Avatar
Name:Olly
Clan:UOA
Skills:python, js, html, css, java
Member Since:Feb 2014
Last Seen:Sep 2014
Profiles:
    Following:4
    Followers:4
    Allies:4
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (135)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • natan
      • created a suggestion for "Inserting multiple strings into another string" kata
      • 7 months ago

      laundry list of annoyances while solving:

      • remove last note about empty insertions resulting in no change, that's redundant
      • say that the array is sorted when introducing the array instead of adding on a "note" later.
      • add test cases with repeated duplicate indices, or motivate why that doesn't happen
      • remove trailing spaces in solution stub
      • fix the age-old issue with the invalid fixed test
    • Custom User Avatar
      • russellscooper
      • commented on "Inserting multiple strings into another string" kata
      • 2 years ago

      You can simnplify your code by using list comprehension for creating 'phrase_list' and 'new_indexes'. You could also use enumerate(indexes) to loop through the indexes and insert the word at a specified location.

    • Custom User Avatar
      • ahmet_popaj
      • commented on "Inserting multiple strings into another string" kata
      • 2 years ago

      Very interesting kata, challenging excersice, congratulations.

    • Custom User Avatar
      • avermakov
      • created an issue for "Only-Readable-Once list" kata
      • 3 years ago

      The result of most solutions can be read multiple times through __iter__ and __next__ methods used in for loops.

      Perhaps there should be tests for that?

    • Custom User Avatar
      • QwEekYhyo
      • commented on "Only-Readable-Once list" kata
      • 3 years ago

      that's because in your init the list is probably pointing towards the base list, so when you delete in the object you also delete in the base list (what happens: a[0] returns 1 and deletes 1 from the a list and from the base list so base[0] returns 2 instead of 1). To avoid this, you need to do a "copy" of the base list without reference by doing something like this : self.list = baselist[:]

    • Custom User Avatar
      • trashy_incel
      • resolved an issue on "Only-Readable-Once list" kata
      • 3 years ago

      yes, thanks :)

    • Custom User Avatar
      • akar-0
      • commented on "Only-Readable-Once list" kata
      • 3 years ago

      Is this enough? https://www.codewars.com/kumite/627bfcb08cb0410023aea688?sel=627bfcb08cb0410023aea688

    • Custom User Avatar
      • trashy_incel
      • created an issue for "Only-Readable-Once list" kata
      • 3 years ago

      description should be updated for Python 3; print is no longer a statement, it's a function

    • Custom User Avatar
      • alexbur
      • commented on "Only-Readable-Once list" kata
      • 3 years ago

      I'm stuck on the same problem/bug. I believe the test cases are ok, as it was corrected few times, maybe i miss something, could anyone explain to me why the tests return different values?

      In a list [1, 2, 3, 4] we get index 0:

      List returned wrong value.: 1 should equal 2

    • Custom User Avatar
      • Kevva
      • commented on "Only-Readable-Once list" kata
      • 3 years ago

      The tests are passing the 'base'-list as a reference to your function, which means that the 'base'-list will be modified if your function doesn't copy it before usage.

    • Custom User Avatar
      • Veronian
      • created a question for "Only-Readable-Once list" kata
      • 4 years ago

      I am having the same problem as jgarwin95. My code does what it says in the description. After defining a = [1, 2, 3, 4], calling a[0] returns 1 and calling it again returns 2 (since a[0] is deleted after the first calling). However, I get an error saying '1 should equal 2' for the first case, and '2 should equal 4' in the second case. Any ideas on why this might be the case? If you need to see my code, let me know and I can copy and paste it.

      And just to see what happens, I redefined my code so that when a[index] is called, it returns (and pops) a[index+1], i.e the output would be 2 in the first case. However, now the test case gave an error saying '2 should equal 1' !!!!

    • Custom User Avatar
      • ozichukwu
      • created an issue for "Inserting multiple strings into another string" kata
      • 4 years ago

      This issue is not fixed.

    • Custom User Avatar
      • Monika Cyprys
      • commented on "Inserting multiple strings into another string" kata
      • 4 years ago

      Once correct solution is when word is inserted before word with the same index and another time is correct when it is after word with the same index, why???
      Any advise, will be appreciate

    • Custom User Avatar
      • AndreyKiriadt
      • commented on "Inserting multiple strings into another string" kata
      • 4 years ago

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

    • Custom User Avatar
      • Dess1996
      • commented on "Inserting multiple strings into another string" kata
      • 4 years ago

      I like this kata. I just find a way to insert by index ^-^)

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...