摘要:
# # 1:编写for循环,利用索引遍历出每一个字符(选做题)msg = 'hello egon 666'for i in range(len(msg)): print(msg[i])# # 2:编写while循环,利用索引遍历出每一个字符msg = 'hello egon 666'count = 阅读全文
摘要:
字符串内置方法: # name='egon' #name=str('egon')# print(type(name)) #优先掌握# 移除空白strip# msg=' hello '# print(msg)# print(msg.strip()) # msg='***hello*********'# 阅读全文