Python字符串函数
- 函数一览
- string.capitalize()
- string.center(width)
- string.count(str, beg=0, end=len(string))
- string.decode(encoding='UTF-8', errors='strict')
- string.encode(encoding='UTF-8', errors='strict')
- string.endswith(obj, beg=0, end=len(string))
- string.expandtabs(tabsize=8)
- string.find(str, beg=0, end=len(string))
- string.index(str, beg=0, end=len(string))
- string.isalnum()
- string.isalpha()
- string.isdecimal()
- string.isdigit()
- string.islower()
- string.isnumeric()
- string.isspace()
- string.istitle()
- string.isupper()
- string.join(seq)
- string.ljust(width)
- string.lower()
- string.lstrip()
- string.maketrans(intab, outtab])
- max(str)
- min(str)
- string.partition(str)
- string.replace(str1, str2, num=string.count(str1))
- string.rfind(str, beg=0,end=len(string) )
- string.rindex( str, beg=0,end=len(string))
- string.rjust(width)
- string.rstrip()
- string.split(str='', num=string.count(str))
- string.splitlines(num=string.count('\n'))
- string.startswith(obj, beg=0,end=len(string))
- string.strip([obj])
- string.swapcase()
- string.title()
- string.translate(str, del='')
- string.upper()
- string.zfill(width)
- string.isdecimal()
Python OS 文件/目录方法
- 方法一览
- os.access(path, mode)
- os.chdir(path)
- os.chflags(path, flags)
- os.chmod(path, mode)
- os.chown(path, uid, gid)
- os.chroot(path)
- os.close(fd)
- os.closerange(fd_low, fd_high)
- os.dup(fd)
- os.dup2(fd, fd2)
- os.fchdir(fd)
- os.fchmod(fd, mode)
- os.fchown(fd, uid, gid)
- os.fdatasync(fd)
- os.fdopen(fd[, mode[, bufsize]])
- os.fpathconf(fd, name)
- os.fstat(fd)
- os.fstatvfs(fd)
- os.fsync(fd)
- os.ftruncate(fd, length)
- os.getcwd()
- os.getcwdu()
- os.isatty(fd)
- os.lchflags(path, flags)
- os.lchmod(path, mode)
- os.lchown(path, uid, gid)
- os.link(src, dst)
- os.listdir(path)
- os.lseek(fd, pos, how)
- os.lstat(path)
- os.major(device)
- os.makedev(major, minor)
- os.makedirs(path[, mode])
- os.minor(device)
- os.mkdir(path[, mode])
- os.mkfifo(path[, mode])
- os.mknod(filename[, mode=0600, device])
- os.open(file, flags[, mode])
- os.openpty()
- os.pathconf(path, name)
- os.pipe()
- os.popen(command[, mode[, bufsize]])
- os.read(fd, n)
- os.readlink(path)
- os.remove(path)
- os.removedirs(path)
- os.rename(src, dst)
- os.renames(old, new)
- os.rmdir(path)
- os.stat(path)
- os.stat_float_times([newvalue])
- os.statvfs(path)
- os.symlink(src, dst)
- os.tcgetpgrp(fd)
- os.tcsetpgrp(fd, pg)
- os.tempnam([dir[, prefix]])
- os.tmpfile()
- os.tmpnam()
- os.ttyname(fd)
- os.unlink(path)
- os.utime(path, times)
- os.walk(top[, topdown=True[, onerror=None[, followlinks=False]]])
- os.write(fd, str)
- os.path 模块