input character in python like getchar in c
import sys
str = ""
while True:
c = sys.stdin.read(1) # reads one byte at a time, similar to getchar()
if c == ' ':
break
str += c
print(str)
Are there any code examples left?
New code examples in category Python