Write Python Program Changes Occurrences First Character S Except First Char Sample Strin Q37059104

python
Write a Python program that changes all occurrences of its first character to S except the first char itself. Sample StringWrite a Python program that changes all occurrences of its first character to ‘S’ except the first char itself. Sample String: restart Expected Result: restaSt Hint: You can use replace function str.replace(old, new) old – This is old substring to be replaced new – This is new substring, which would replace old substring. Show transcribed image text Write a Python program that changes all occurrences of its first character to ‘S’ except the first char itself. Sample

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.