String arguments in python multiprocessing

前端 未结 3 538
生来不讨喜
生来不讨喜 2021-02-01 01:54

I\'m trying to pass a string argument to a target function in a process. Somehow, the string is interpreted as a list of as many arguments as there are characters.

This

3条回答
  •  爱一瞬间的悲伤
    2021-02-01 02:19

    Change args=('hello') to args=('hello',) or even better args=['hello']. Otherwise parentheses don't form a sequence.

提交回复
热议问题