Python Strings and Python Lists, Basic Computer Science

Python Strings:
Strings in Python are recognized as an adjacent set of characters in among quotation marks.
Python permits for either pairs of single or double quotes. Subsets of strings can be taken with the slice operator ([ ] and [:]) with indexes starting at 0 in the starting of the string and working their way from -1 at the end.
The (+) plus sign is the string concatenation operator and the (*) asterisk is the repetition operator.

Python Lists:
Lists are the most adaptable of Python''s compound data types. A list holds items divided by commas and enclosed inside square brackets ([]).
To a few extents, lists are close to arrays in C. One difference among them is that all the items belonging to a list can be of dissimilar data type. The plus (+) sign is the catalog concatenation operator and the asterisk (*) is the repetition operator. The values stored in a list can be used with the help of the slice operator ([ ] and [:]) with indexes early at 0 in the beginning of the list and working their way to end-1.
Posted Date: 5/5/2012 3:52:05 AM | Location : United States







Related Discussions:- Python Strings and Python Lists, Assignment Help, Ask Question on Python Strings and Python Lists, Get Answer, Expert's Help, Python Strings and Python Lists Discussions

Write discussion on Python Strings and Python Lists
Your posts are moderated
Related Questions
Flowcharting: Flowcharting: A Flowchart is a graphical representation of an algorithm. It can be compared to the blueprint of a building. Just as a building contractor refers

even though most systems only distinguish among user and kernel modes, some CPUs provide multiple modes. Multiple modes could be used to provide a finer-grained security strategy.

Question 1 Explain the operations of ALU Question 2 Write down the Booth's Multiplication Algorithm with an example Question 3 Explain the characteristics of memor

The 7489 TTL Ram Device: The 7489 TTL Ram package has 64 memory cells, each cell is capable of holding a single bit of data.  The cells are organised into locations, and each l

what is the meaning of data definition

Consider the one-time pad encryption scheme to encrypt a 1-bit message m, and assume m is chosen with uniform distribution from message space M={0,1}. Let E1 be the event "message

Question 1 Consider the one-time pad encryption scheme to encrypt a 1-bit message m, and assume m is chosen with uniform distribution from message space M={0,1}. Let E1 be the eve

access,excel and ms word/

QUESTION 1 Describe the binary search algorithm using an example of your own. QUESTION 2 (a) By showing all your workings, give a big-O estimate for f(x) = (x + 1)lo

2. What benefits can a company gain by managing its own information infrastructure and services?