- Sep 2020
-
greenteapress.com greenteapress.com
-
10ListsThis
List List is a collection of values which is ordered and changeable. Allows duplicate members. Nested list is possible ( list containing one more list). They are mutable means no fixed elements.List slices are possible with index numbers (0:2) .Operations used in list -- ' + ' concatenates the list, ' * ' repeats a list a given number of times. Aliasing -- variable's value is assigned to another variable. List methods -- append() , extend() , sort() , map() , split() , etc
-
8StringsStrings
Strings A string is a finite sequence an alphabet. Each sub string is called by there index. Strings are immutable which mean they cannot be edited or changed. To access characters in the String, method of slicing is used. Slicing in a String is done by using a Slicing operator (colon,: ). Built in functions -- upper(), lower(), replace(),type(), etc. Operators:+, *, in, not in..etc.Comparison and debugging of strings is possible.
Tags
Annotators
URL
-