title: Is there a built-in function in Python 3 like getchar() in C++?
body: <p>I want to do user input in python which is similar to <strong>getchar()</strong> function used in c++.</p>
  
  <p>c++ code:</p>
  
  <pre><code>#include&lt;bits/stdc++.h&gt;
  
  using namespace std;
  int main()
  {
  char ch;
  while(1){
      ch=getchar();
      if(ch==' ') break;
      cout&lt;&lt;ch;
  }
  return 0;
  }
  </code></pre>
  
  <p>Input: stack overflow</p>
  
  <p>Output: stack</p>
  
  <p>In the above code, when a space input from the user than the loop breaks.
  I want to do this in python using <strong>getchar()</strong> type function as I used in c++ code.</p>