• create dict in python


    bobargs = dict((f + '__contains', 'bob') for f in ('title', 'subtitle', 'text', 'byline'))

    this will create a dict 'bobargs' which contain filed 'title', 'subtitle', 'text', 'byline', and all fields will be signed will 'bob'

  • 相关阅读:
    day 38
    day 37
    day 36
    day 35
    day 34
    day 33
    day 32
    day 31
    day 30
    day 29
  • 原文地址:https://www.cnblogs.com/henyihanwobushi/p/2676392.html
Copyright © 2020-2023  润新知