Python Day2 字符串

1.字符串 字符串有三種形式 str1 = 'hello world' str2 = "hello world" str3 = """hello world""" 2.轉義字符 \n:代表換行符 \t:代表一個tab符 \'':代表"本身 \':代表'本身 3.字符串的索引 給定一個字符串,利用字符串中各個字符的位置,便可以找到對應的字母,索引值從0開始 如果輸入的是負數,則是從後向前索引 4.字
相關文章
相關標籤/搜索