title: trying to change the functions of a string
body: <p>I wrote this code so that the user could input a sentence and then be given a list of options to choose to edit their sentence or check if things are true. I am trying to make it loop until the user says no to seeing another function, but I'm not sure how to do it. </p>
  
  <p>How can I make it so that the user can decide whether or not to continue seeing the list? </p>
  
  <pre><code>def main():
    global string
    string = str(input("Write a sentence with both numbers and letters: "))
    print("There are many different options when it comes to string functions")
    print("Here is a list of options that you can use to edit your sentence:")
      title()
      lower()
      upper()
      islower()
      isupper()
      isspace()
      count()
      strip()
      replace()
      decimal()
      alpha()
      numeric()
      swap()
  
  def title():  
    title = input("would you like to change the first letter of each word to UPPERCASE?")
    if title == "yes":
      print(string.title())
  
  def lower():    
    lower = input("Would you like to change all characters to lowercase?")
    if lower == "yes":
      print(string.lower())
  
  def upper():
    upper = input("Would you like to change all characters to UPPERCASE? ")
    if upper == "yes":
      print(string.upper())
  
  def islower():
    islower = input("Would you like to check if your sentence is all lowercase? ")
    if islower == "yes":
      print(string.islower())
  
  def isupper():
    isupper = input("Would you like to check if your sentence is all UPPERCASE? ")
    if isupper == "yes":
      print(string.isupper())
  
  def isspace():
    isspace = input("Would you like to check if your sentence is only spaces? ")
    if isspace == "yes":
      print(string.isspace())
  
  def count():
    count = input("Would you like to count the number of 'a' letters that are in your sentence? ")
    if count == "yes":
      print(string.count("a"))
  
    isdigit = input("Would you like to check if your sentence is all digits? ")
    if isdigit == "yes":
      print(string.isdigit())
  
  def strip():
    strip = input("Would you like to take out the spaces before and after your sentence? ")
    if strip == "yes":
      print(string.strip(" "))
  
  def replace():
    replace = input("Would you like to replace 'a' with 'X' in your sentence? ")
    if replace == "yes":
      print(string.replace("a", "X"))
  
  def decimal():
    decimal = input("Would you like to check if your sentence is all decimals? ")
    if decimal == "yes":
      print(string.isdecimal())
  
  def alpha():
    alpha = input("Would you like to check if your sentence is all letters from the alphabet? ")
    if alpha == "yes":
      print(string.isalpha())
  
  def numeric():
    numeric = input("Would you like to check if your sentence is made up of numbers? ")
    if numeric == "yes":
      print(string.isnumeric())
  def swap():
    swap = input("Would you like to swap the uppercase letters with the lowercase letters? ")
    if swap == "yes":
      print(string.swapcase())
  
  
  main()  
  </code></pre>