码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2019-09-07 10:42:40      阅读:94      评论:0      收藏:0      [点我收藏+]

标签:one   Python全栈   python   tar   bsp   and   span   闯关   ati   

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-细节总结汇总

标签:one   Python全栈   python   tar   bsp   and   span   闯关   ati   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!