Python3 字符串
- 函数一览
- capitalize()
- center(width, fillchar)
- count(str, beg= 0,end=len(string))
- bytes.decode(encoding=\utf-8\, errors=\strict\)
- encode(encoding='UTF-8',errors='strict')
- endswith(suffix, beg=0, end=len(string))
- expandtabs(tabsize=8)
- find(str, beg=0 end=len(string))
- index(str, beg=0, end=len(string))
- isalnum()
- isalpha()
- isdigit()
- islower()
- isnumeric()
- isspace()
- istitle()
- isupper()
- join(seq)
- len(string)
- ljust(width[, fillchar])
- lower()
- lstrip()
- maketrans()
- max(str)
- min(str)
- replace(old, new [, max])
- rfind(str, beg=0,end=len(string))
- rindex( str, beg=0, end=len(string))
- rjust(width,[, fillchar])
- rstrip()
- split(str=\\, num=string.count(str))
- splitlines( num=string.count('\\n'))
- startswith(str, beg=0,end=len(string))
- strip([chars])
- swapcase()
- title()
- translate(table, deletechars=\\)
- upper()
- zfill (width)
- isdecimal()
Python3 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)