Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON! Write a function after_t(word) that takes in a string representing a single lowercase English word, and returns the same word but with all letters
PYTHON!
Write a function after_t(word) that takes in a string representing a single lowercase English word, and returns the same word but with all letters that come after the first 't' capitalized (including the t itself). Only the location of the first 't' matters: any further 't's are capitalized just like any other letter past the first one. You can assume there will be at least one 't'.
Hint: The following techniques/string methods are likely to be useful: String slicing String concatenation .find .upper
For exmaple:
>>> after_t('trains') 'TRAINS' >>> after_t('attractor') 'aTTRACTOR' >>> after_t('suspect') 'suspecT'
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started