I am new to programming and Python. I am trying to achieve the to user input function to read the variable. Basically the following code works but uses whatever domain i specify in domain = variable import dns.resolver #i would like user inputs the domain and that domain's DNS is checked input('Please type your domain\n') #unfonetly it reads from here domain = 'example.com' for qtype in 'A', 'AAAA', 'MX', 'NS', 'TXT', 'SOA': result = dns.resolver.resolve(domain,qtype, raise_on_no_answer=False) if result.rrset is not None: print(result.rrset) print('Record checked successfully\n') Thanks in advance Continue reading...