Starting letter of multiple word

eg - tata memorial hospital

in this i want the first letters of each word (tmh) and store it in a variable.

so how to do this, pls help.

Thank You

2 Likes

thank you for the code.

If possible can you explain how this works?

the result will be in Var Y, right?

  1. It splits the text (in this case, "google en passant") into a list, with the separator being the space character. This forms a list: ["google", "en", "passant"].
  2. It iterates through the list, and adds the first letter of the item (using segment) to the global variable y. This happens for every element in the list.
  3. Once the for loop has iterated through every element, global variable y should contain the desired output ("gep").

I've modified my code to remove trailing/leading spaces. Please use that, instead: it adds a trim block to the definition of local variable x).

1 Like

ok, thanks

sss22042024 - sjjsnsjssj
q22042024 - qqwkeodkxjxm
qmq22042024 - mmmm qwer

Its not 100% accurate?
any changes?

please explain what you get currently and what you like to get instead
the result should be s-s

what about adjusting the algorithm yourself accordingly?

Taifun

2 Likes

That's because your input is outside the originally assumed constraints. I encourage you to try and fix it yourself.

1 Like

ok thank you for help

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.