1pip install keyboard
2
3import keyboard
4
5keyboard.press_and_release('shift+s, space')
6
7keyboard.write('The quick brown fox jumps over the lazy dog.')
8
9keyboard.add_hotkey('ctrl+shift+a', print, args=('triggered', 'hotkey'))
10
11# Press PAGE UP then PAGE DOWN to type "foobar".
12keyboard.add_hotkey('page up, page down', lambda: keyboard.write('foobar'))
13
14# Blocks until you press esc.
15keyboard.wait('esc')
16
17# Record events until 'esc' is pressed.
18recorded = keyboard.record(until='esc')
19# Then replay back at three times the speed.
20keyboard.play(recorded, speed_factor=3)
21
22# Type @@ then press space to replace with abbreviation.
23keyboard.add_abbreviation('@@', 'my.long.email@example.com')
24
25# Block forever, like `while True`.
26keyboard.wait()
1#variable for the input:
2variable_name = input("please add your input: ")
3print(variable_name)
4
5#example
6#output(Type Hi please: ")
7#print(output)
8#Output will be Hi if you typed hi
1# To get input from the user in python:
2
3x = input("Optional prompt for input here")
1Enter the value which is of type string BTechGeeks
2the type of entered input value = <class 'str'>
3Enter the value which is of type integer 356
4the type of entered input value = <class 'str'>