t333.py 399 B

123456789101112131415161718192021
  1. x = "Please make startswith and endswith work"
  2. if x.startswith("Please") :
  3. print "Starts with Please"
  4. else:
  5. print "Not good"
  6. if x.endswith("work") :
  7. print "Ends with work"
  8. else:
  9. print "Not good"
  10. if x.startswith("please") :
  11. print "Not good"
  12. else:
  13. print "Does not start with please"
  14. if x.endswith("please") :
  15. print "Not good"
  16. else:
  17. print "Does not end with please"