45-python based -python3- string - Common string method (c)

4- startsWith string method () and endsWith ()

  • startswith () and endswith () to determine whether the string to start or end of a string, there is a return True, otherwise, the method returns False.

Example 1:

Example 2:

 

Guess you like

Origin www.cnblogs.com/summer1019/p/11369657.html