我有一个哈希表,其键的模式为 USER_TEL,例如:
bob_123456 : Some address
mary_567894 : other address
john_123456 : third address
Run Code Online (Sandbox Code Playgroud)
现在,我想获取在其密钥中具有相同电话号码的所有用户的地址。
我想出的是:
tel = 123456
r.hmget('address_book', '*_%s' % tel)
Run Code Online (Sandbox Code Playgroud)
我得到[None]而不是值。