Several string processing methods:

xiaoxiao2021-03-06  13

Body = Raw_INPUT ("Please enter a string:")

Print "Total Charters IS% D"% Len (Body)

Lines = body.splitlines ()

Print "Total Lines IS% D"% LEN (LINES)

Words = body.split ()

Print "Total Words IS% D"% Len (Words)

Type the word or Lines, you can enter the string you entered, two, but the output is different from the LEN calculation.

转载请注明原文地址:https://www.9cbs.com/read-50299.html

New Post(0)