单项选择题

在Python中,socket模块中的()函数用于将主机名转换为IP地址。

A.gethostname
B.gethostbyname
C.inet_aton
D.getaddrinfo