Ad
  • Custom User Avatar

    i changed it to be less value. is this better

    "Your task is to make a program which takes in a sentence and returns a string which shows the position
    of each word in the sentence. If a word appears more than once in the sentence, your string should
    return the position of the first occurrence of the word. Capitalisation of words should be accounted for:
    'BEE' should be considered the same as 'bee'. The sentences include no punctuation."

  • Default User Avatar

    haha; I was just thinking the same thing. 1 line of code isn't better if first response is 'whhaaat' to looking at it and you have to disect it.

    ...but way to use the various built-in methods.

    Clever, but not sure about best practice.

  • Default User Avatar
  • Custom User Avatar

    This is not a question, and please don't spoil solutions. Users are not supposed to solve the katas by reading the Discourse page.