I am writing a code on Linux, but there is a problem that I cannot understand.
k = input("Q for Close")
if ( k == "q" ):
quit()
But it gives an error like this.
if ( k == “q” ):
IndentationError: unexpected indent
Is there a library that works as soon as the key is pressed instead of doing this? I would be happy if you help..
Libraries I use:
import os
import time
import colorama
import threading
import pygame
import sys
from tqdm import tqdm
from colorama import Fore, Back, Style
I wanted the program to end as soon as the key was pressed or when the key was pressed and ENTER was pressed.