Question: Pyhton Write a function that accepts a string as an argument and returns True if the argument ends with the substring '.com'. Otherwise, the function

Pyhton

Write a function that accepts a string as an argument and returns True if the argument ends with the substring '.com'. Otherwise, the function should return False. Ask the user to enter a string and call your function inside a print statement with the string as an argument. Example Output:

Enter a string: www.python.org

False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!