摘要:
# # 1:编写for循环,利用索引遍历出每一个字符(选做题)msg = 'hello egon 666'for i in range(len(msg)): print(msg[i])# # 2:编写while循环,利用索引遍历出每一个字符msg = 'hello egon 666'count = 阅读全文
posted @ 2017-07-19 15:31
风火林山
阅读(113)
评论(0)
推荐(0)
摘要:
字符串内置方法: # name='egon' #name=str('egon')# print(type(name)) #优先掌握# 移除空白strip# msg=' hello '# print(msg)# print(msg.strip()) # msg='***hello*********'# 阅读全文
posted @ 2017-07-19 15:29
风火林山
阅读(131)
评论(0)
推荐(0)

浙公网安备 33010602011771号