Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
5

Auto Enter

SilentS100
SilentS100

Is there a way to make python enter the first thing you type in a input (with out you clicking ‘enter’)

4 years ago
You are viewing a single comment. View All
5
Scoder12
Scoder12

Yes. You can use

import sys import tty tty.setraw(sys.stdin) letter = sys.stdin.read(1) # put however many characters you want print(letter)

I am a repl.it helper. If this is a good answer please upvote.

4 years ago