[python]特殊输入格式(输入中包含空格逗号等)

Posted xzzheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[python]特殊输入格式(输入中包含空格逗号等)相关的知识,希望对你有一定的参考价值。

  • 特殊输入格式

    • 输入中包含空格

      a,b=map(int,input().split())

      a,b,c=map(int,input().split())

    • 输入中包含 ‘/‘

      a,b=map(int,input().split(‘/‘))

    • 输入中包含‘,‘

      a,b=map(int,input().split(‘,‘))

以上是关于[python]特殊输入格式(输入中包含空格逗号等)的主要内容,如果未能解决你的问题,请参考以下文章