search

Home  >  Q&A  >  body text

python中elif与else if有没有什么区别?

python中elif与else if有没有什么区别?

怪我咯怪我咯2804 days ago1212

reply all(7)I'll reply

  • PHPz

    PHPz2017-04-17 16:45:09

    There is no '''else if''' statement in Python. The equivalent is '''elif'''. The name is also the "abbreviation" of the former

    reply
    0
  • 阿神

    阿神2017-04-17 16:45:09

    Is there an else if

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 16:45:09

    There are if, elif, else

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 16:45:09

    There is no syntax like else if

    in python

    reply
    0
  • PHPz

    PHPz2017-04-17 16:45:09

    elif in python is else if in other languages, just the name is different.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 16:45:09

    There is no else if in python, only elif, which is equivalent to else if in other languages.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 16:45:09

    No, python is to make the code more beautiful, so else if is abbreviated to elif

    reply
    0
  • Cancelreply