| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 422 人关注过本帖
标题:在没有 else 的情况下 if 跟elif 是一样的吗?
取消只看楼主 加入收藏
Z89
Rank: 2
等 级:论坛游民
威 望:1
帖 子:91
专家分:32
注 册:2022-4-26
结帖率:66.67%
收藏
 问题点数:0 回复次数:0 
在没有 else 的情况下 if 跟elif 是一样的吗?
在没有 else 的情况下   if 跟elif  是一样的吗?



程序代码:
if ttmoob =='a':
     resb =corda1(ddaa,1905,168)
elif ttmoob =='b':
    resb =corda1(ddaa,1391,145)
elif ttmoob =='c':
     resb =corda1(ddaa,1545,158)
elif ttmoob =='d':
     resb =corda2(ddaa,210,55)



程序代码:
if ttmoob =='a':
     resb =corda1(ddaa,1905,168)
if ttmoob =='b':
    resb =corda1(ddaa,1391,145)
if ttmoob =='c':
     resb =corda1(ddaa,1545,158)
if ttmoob =='d':
     resb =corda2(ddaa,210,55)
2023-11-01 22:02
快速回复:在没有 else 的情况下 if 跟elif 是一样的吗?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015377 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved