Check if input is a list/tuple of strings or a single string

前端 未结 9 1237
执念已碎
执念已碎 2020-12-24 05:13

I\'ve a method that I want to be able to accept either a single string (a path, but not necessarily one that exists on the machine running the code) or a list/tuple of strin

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-24 05:22

    Have you considered varargs syntax? I'm not really sure if this is what you're asking, but would something like this question be along your lines?

提交回复
热议问题