Implement function ion() that takes a string as input and returns True if the entered string ends in 'ion' and false otherwise.
ion('congratulation')
True
ion('marathon')
False
How can I start this off and Finish it?
matthew.s.thomas.14 0
Newbie Poster
Recommended Answers
Jump to PostYou can give endswith() a tuple of choices, for instance
s.endswith(("ion", "ION"))
All 4 Replies
vegaseat 1,735
DaniWeb's Hypocrite Team Colleague
BearofNH 104
Posting Whiz
TrustyTony
commented:
No sense -3
vegaseat 1,735
DaniWeb's Hypocrite Team Colleague
TrustyTony 888
pyMod Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.