Skip to content

Instantly share code, notes, and snippets.

@JuniorMSG
Created May 1, 2021 17:46
Show Gist options
  • Save JuniorMSG/8837e091a564476fc60f178cb7701344 to your computer and use it in GitHub Desktop.
Save JuniorMSG/8837e091a564476fc60f178cb7701344 to your computer and use it in GitHub Desktop.
python string_built_in_fn
def string_bulit_in_fn():
    """
        문자열 내장함수
        :return:
    """
    str = '  built In Function  '
    str2 = '_'
 
    print("str.count('i')  : ", str.count('i'))
    print("str.count('Fn') : ", str.count('Fn'))
    print("str.find('F')   : ", str.find('F'))
    print("str.index('l')  : ", str.index('l'))
    print("str.find('Q')   : ", str.find('Q'))
    print("str.index('Q')  :  error ")
    print("str.join(str2)  : ", str2.join(list(str.split())))
    print("str.upper()              : ", str.upper())
    print("str.lower()              : ", str.lower())
    print("str.replace('In', 'Out') : ", str.replace('In', "Out"))
    print("str.split()              : ", str.split())
    print("str.lstrip() : ", str.lstrip())
    print("str.rstrip() : ", str.rstrip())
    print("str.strip()  : ", str.strip())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment