Sequence Type Operators and Functions


Table B.4 contains the set of operators, (built-in and factory) functions, and built-in methods that can be used with sequence types.

Table B.4. Sequence Type Operators, Built-in Functions, and Methods

Operator, built-in function or method

str

list

tuple

[] (list creation)

 

 

()

  

""

  

append()

 

 

capitalize()

  

center()

  

chr()

  

cmp()

count()

 

decode()

  

encode()

  

endswith()

  

expandtabs()

  

extend()

 

 

find()

  

hex()

  

index()

 

insert()

 

 

isdecimal()

  

isdigit()

  

islower()

  

isnumeric()

  

isspace()

  

istitle()

  

isupper()

  

join()

  

len()

list()

ljust()

  

lower()

  

lstrip()

  

max()

min()

oct()

  

ord()

  

pop()

 

 

raw_input()

  

remove()

 

 

replace()

  

repr()

reverse()

 

 

rfind()

  

rindex()

  

rjust()

  

rstrip()

  

sort()

 

 

split()

  

splitlines()

  

startswith()

  

str()

strip()

  

swapcase()

  

split()

  

title()

  

tuple()

type()

upper()

  

zfill()

  

. (attributes)

 

[] (slice)

[:]

*

%

  

+

in

not in




Core Python Programming
Core Python Programming (2nd Edition)
ISBN: 0132269937
EAN: 2147483647
Year: 2004
Pages: 334
Authors: Wesley J Chun

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net