-5

I need to split the string everytime ; shows up.

words = "LightOn;LightOff;LightStatus;LightClientHello;"

Output should be something like this:

LightOn
LightOff
LightStatus
LightClientHello

Simply, everytime it finds ; in a string, it has to split it.

Thank you for help

Ryci
  • 1
  • 6

1 Answers1

1
res = words.split(";")

Refer to this link for more information on split.

Treyten Carey
  • 641
  • 7
  • 17