Python Split Exercises Let’s check out some exercises that will help understand .split() method better. Exercise 3-a: Splitting Up Words Using Split Method Split the string based on space character: " ". #Type your answer here. str="Hello World!" lst= print(lst) ==== from unittest.gui import TestCaseGui class myTests(TestCaseGui): def testOne(self): self.assertEqual(lst,str.split(" "),"lst checks") myTests().main() Hint 1 .split() method can be used to split strings based on a given character. It returns a list of split substrings. Solution lst = str.split(" ") Exercise 3-b: Splitting up based on a specific character (:) with split method Split the numbers. str="101:102:103:201:202" #Type your code here. lst= print(lst) ==== from unittest.gui import TestCaseGui class myTests(TestCaseGui): def testOne(self): self.assertEqual(lst,str.split(":"),"lst checks") myTests().main() Hint 1 .split() method can be used to split strings based on a given character. It returns a list of split substrings. Solution lst = str.split(":") Exercise 3-c: Splitting based on special character (;) Using the split method, split the string with semi colon (;) first. Then, print only the last element. str="Arsenal:0-Chelsea:1;Barcelona:2-Bayern Munich:2" #Type your code here. lst= ans_1= print(ans_1) ==== from unittest.gui import TestCaseGui class myTests(TestCaseGui): def testOne(self): self.assertEqual(ans_1,lst[-1],"ans_1 checks") myTests().main() Hint 1 .split() method can be used to split strings based on a given character. It returns a list of split substrings. Solution lst = str.split(";")ans_1 = lst[-1]