Selenium自动化初学-第二节:python基础

一、输出--------
# print("hello world")
# name = "tom"
# age = 27
# print("name is :" + name + ",age is :" + str(age)) # String 字符拼接
# print("name is : %s,age is : %d" % (name, age)) #格式符 %s字符串 %d数字 %r不知道类型都可用
# print("name is :{},age is:{}".format(name,age))#格式化函数format 不指定位置就是默认顺序--推荐
# print("name is :{1},age is:{0}".format(age,name))
# print("name is :{n},age is:{a}".format(n=name,a=age))
二、 分支与循环---------
# a = 2
# b = 3
# if a > b:
# print("a max")
# else:
# print('b max')
# if 2 + 2 == 4:
# print("ok")
# else:
# print("no")
# c = "hello"
# d = "hello c"
# if c in d:
# print("c in d")
# else:
# print("c not in d")
# if True:
# print("True")
# else:
# print("False")
# result = 66
# if result > 90:
# print("优秀")
# elif result > 70:
# print("不错")
# elif result >= 60:
# print("及格")
# else:
# print("不及格")
# for

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值