Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Python
String 75 codes
Home
Python
String
1 A sentence is split up into a list of words
2 An index that is too large is replaced by the string size
3 An invariant of slice operations
4 Built-in function len() returns the length of a string
5 Compare two strings
6 Concantenate a string by
7 Concatenate Strings (glued together) with the + operator, and repeated with
8 Content tests
9 Convert int
10 Convert string
11 Degenerate slice indices
12 Demonstrates creating new strings with a for loop
13 Demonstrates string concatenation and repetition
14 Demonstrates the for loop with a string
15 Demonstrates the len() function and the in operator
16 Demonstrates the use of quotes in strings
17 Escape characters
18 Escape Codes
19 Find substring in a string
20 Finding a substring in a string
21 For Statements to list the string length
22 Formatting example
23 Get the length
24 Get the length of a string with escape characters inside
25 Indices may be negative numbers, to start counting from the right For example
26 Introducing ljust
27 Is a character inside a string
28 Join a list
29 Joining strings
30 Keeps (Back splash) literally
31 Match two string
32 Mix quotations
33 Negative Indices numbers
34 Output and get length of a string with special characters
35 Print out dashes in an easy way
36 Printing a List
37 Quotation inside a quotation
38 Replace all
39 Replace one
40 Searching from end of string
41 Searching strings for a substring
42 Special char output
43 Split a string by
44 Split and join
45 Splitting a String
46 Splitting strings
47 Step through String Items
48 String across several lines
49 String can be expressed in several ways
50 String concatenation Demo
51 String endswith
52 String escape sequences Demo
53 String indexing
54 String JOIN
55 String literals span multiple lines in several ways
56 String method
57 String repitition demo
58 String replace Demo
59 String replacement
60 String search
61 String Slice
62 String slicing
63 String splits by another string
64 String to list
65 String zfill() pads a numeric string on the left with zeros
66 Strings are printed without quotes, and a space is inserted inbetween
67 Strings can be expressed in several ways
68 Strings can be subscripted (indexed)
69 Strings translate
70 Stripping whitespace from a string
71 Table of powers using formatting codes
72 The use of a variable
73 The use of quotes in strings
74 Two ways to write a table of squares and cubes
75 Use r to define a string and return its length