python - 变量的类型是什么

标签 python soappy

我是 Python 的新手,我有以下代码:

from SOAPpy import WSDL

fichier_wsdl = 'http://geocoder.us/dist/eg/clients/GeoCoder.wsdl'
wsdl = WSDL.Proxy(fichier_wsdl)
callInfo = wsdl.methods['geocode']
ss = wsdl.geocode('1600 Pennsylvania Ave, Washington, DC.')
print(ss)

结果是:

IMPORT:  http://schemas.xmlsoap.org/soap/encoding/
no schemaLocation attribute in import
<<class 'SOAPpy.Types.typedArrayType'> results at 21824752>: [<SOAPpy.Types.structType item at 21818984>: {'city': 'Washington', 'prefix': '', 'suffix': 'NW', 'zip': 20502, 'number': 1600, 'long': -77.037684, 'state': 'DC', 'street': 'Pennsylvania', 'lat': 38.898748, 'type': 'Ave'}]

我试着了解我的 ss 变量是什么类型(print(type(ss)) get SOAPpy.Types.typedArrayType 这对我来说不是很清楚)? 以及如何为城市或街道提供一个简单的变量?

最佳答案

你可以只做 type(variable name)

关于python - 变量的类型是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5224400/

相关文章:

multithreading - 如何及时响应用户,优雅的处理第三方服务器的不良行为?

python SOAP 添加 header

python - 无法使用 SOAPpy 调用 Web 服务方法

Python XlsxWriter 图表 : x-axis value labels angle orientation

python - 为什么 "else"子句的目的是在 "for"或 "while"循环之后?

python - Python 是用来做什么的?

Python 主机名解析非常慢

python - 如何在 Matplotlib 中反转轴并设置极坐标图的零位置?

python - 将 Cookie 添加到 ZSI 帖子

python - 将 SOAP header 读取到 SOAPpy 响应?