title: How to remove or strip off white spaces without using strip() function?
body: <blockquote>
    <p>Write a function that accepts an input string consisting of alphabetic
    characters and removes all the leading whitespace of the string and
    returns it without using .strip(). For example if:</p>
    
    <p>input_string = "    Hello  "</p>
    
    <p>then your function should return a string such as:</p>
    
    <p>output_string = "Hello  "</p>
  </blockquote>
  
  <p>The below is my program for removing white spaces without using strip:</p>
  
  <pre><code>def Leading_White_Space (input_str):
      length = len(input_str)
      i = 0
      while (length):
          if(input_str[i] == " "):
              input_str.remove()
          i =+ 1
          length -= 1
  
  
  #Main Program
  input_str = "    Hello    "
  result = Leading_White_Space (input_str)
  print (result)
  </code></pre>
  
  <p>I chose the remove function as it would be easy to get rid off the white spaces before the string 'Hello'. Also the program tells to just eliminate the white spaces before the actual string. By my logic I suppose it not only eliminates the leading but trailing white spaces too. Any help would be appreciated.</p>