<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            ???? Python ???
            ??9?? ?????
            ???? ??????????????? ????

            ???????????????

            ??????????????????????????????????????????????????????????????????????????§Ù???????§»?????????????????????????????????????????????????

            ??????????????????????str?????????????§»???????????????????????????????????????§»???????????§Ò????¦Ì?help(str)??

            ??????????

            ??9.7 ??????????

            #!/usr/bin/python
            # Filename: str_methods.py


            name = 'Swaroop' # This is a string object

            if name.startswith('Swa'):
                print 'Yes, the string starts with "Swa"'

            if 'a' in name:
                print 'Yes, it contains the string "a"'

            if name.find('war') != -1:
                print 'Yes, it contains the string "war"'

            delimiter = '_*_'
            mylist = ['Brazil', 'Russia', 'India', 'China']
            print delimiter.join(mylist)

            ????????code/str_methods.py??

            ???

            $ python str_methods.py
            Yes, the string starts with "Swa"
            Yes, it contains the string "a"
            Yes, it contains the string "war"
            Brazil_*_Russia_*_India_*_China

            ????¦É???

            ??????????????????????????????startwith?????????????????????????????????????in????????????????????????????????????????????????

            find?????????????????????????????????§Ö?¦Ë??????????-1??????????????????str????????????????????????join???§Ö??????????????????????????????????????


            ???? ????? ????
            ?¦Ï? ??? ????
            ?????
            @ssv
            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      ÑÇÖÞÅ·ÃÀÔÚÏß