Learn about String methods
Work with the Python documentation
Perform a simple Google search (or use any other search engine)on “Python String methods”. One of the first links will be to thePython webpage detailing the built-in data types. This pagecontains a description of the methods available in Stringvariables. You may use other webpages for this assignment, but youneed to be aware of the official documentation for thelanguage.
The webpage lists methods that are part of every Stringvariable. The methods can return information about the data in theString variable, such as an integer or a Boolean value, or evenreturn a new String value. NONE of the method will alter the valuein the variable.
Given a String variable x identify the method, or methods, whichcan be used to perform the following tasks. Quite often there aretwo, and possibly more, methods that could be used perform thetasks. Write the function or method, with the argument(s) (ifneeded) to perform the tasks. Don’t worry about using the results,just demonstrate how to use the function/method. For example, ifthe question was “Determine if x starts with a ‘q’”, the methodcall would be:
Determine how many characters are in x.
Determine the position of the first occurrence of the letter “q”in x.
Determine if the last character in x is the letter “q”.
Get a copy of x in all upper case letters.
Is x already comprised of all upper case letters.
Get a copy of x in all lower case letters.
Determine if x contains any characters at all.
Get a copy of x with the first blank space (” “)changed to adash (“-“).
Get a copy of x with all blank spaces (” “) changed to dashes(“-“).
Break up x into one or more values by a delimiter. For example,if a string
contained “a,b,c”, how could your program return the values “a”and “b” and “c”?
Determine if x “looks like” a number. Remember, the int()function crashes if
the supplied string doesn’t “look like” a number.
Determine if x “looks like” a name, meaning it contains only thecharacters ‘a’
through ‘z’, either upper or lower case.
Answer to Objective Learn about String methods Work with the Python documentation Specifics Perform a simple Google search (or use…