StringsRepresentation
Common Operationss[i] # Return the ith character s[i:j] # Extract a substring len(s) # String length Exampless = "Hello World" x = s[4] # x = 'o' y = s[0:5] # y = 'Hello' print len(s) |
<<< | O'Reilly OSCON 2000, Introduction to Python, Slide 38 July 17, 2000, beazley@cs.uchicago.edu |
>>> |