首页 > 编程语言 > 详细

python全栈闯关--XX-细节总结汇总

时间:2019-09-07 10:53:01      阅读:77      评论:0      收藏:0      [点我收藏+]

1、The start value of slice is less than then end value,and the step is negative

print("if the start value less then the end value and the step is negative ! "
      "No error will be reported and empty will be returned, ")
for i in range(0, 10, -1):
    print(i)

 

2、One line of code exchanges the value of a and b

# One line of code exchanges value of a and b
a = 1
b = 2
a, b = b, a
print(a, b)

 

python全栈闯关--XX-细节总结汇总

原文:https://www.cnblogs.com/zxw-xxcsl/p/11479201.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!