1👍
If you have correctly installed python-whois into your Python runtime environment then, for example:
import whois
wd = whois.whois('google.com')
Then, for example:
print(*wd['domain_name'])
Output:
GOOGLE.COM google.com
Source:stackexchange.com