Question: Write a Python expression to do the following: [8 marks] Assuming that variable forecast has been assigned string 'It will be a sunny day today'
![Write a Python expression to do the following: [8 marks] Assuming](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45196434c6_70166f45195b3aed.jpg)
Write a Python expression to do the following: [8 marks] Assuming that variable forecast has been assigned string 'It will be a sunny day today' Write Python statements corresponding to these following: 1. To count, the number of occurrences of string 'day' in string forecast. 2. To capitalize the first character in the string forecast. 3. To replace the substring 'sunny' is by 'cloudy. 4. To split the substring using the default delimiter blank space. 7 - B I = E E
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
