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
Output Devices Video Display Unit (VDU) or Monitor Video Display Unit is similar to a television. It is used to display the results of processes. The screen is il

There are two kinds of procedures, the intrasegments, which are found on the similar segment of instructions and the inter-segments which can be stored on dissimilar memory segment

What is methods For handling Deadlocks?

QUESTION (a) Consider a system with input x[n] and output y[n] that satisfy the difference equation:                                   Y[n] = x[n] + 0.5 x[n-2] + 0.2 x[n+1]

Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr

The Python language has a lot of similarities to Perl, C and Java. Though, there are some specific differences between the languages. First Python Program: relative Mode Programmin

We normally think of the arts as very different from technologies in spite of the fact that art (with perhaps a few exceptions) is practiced with the help of technology. This pract

Ask queswhat is the advanages of eeprom?

QUESTION 1 Discuss the advantages and disadvantages of printed indexes. QUESTION 2 (i) The Library of Congress Subject Headings List and the Sears Subject Headings List

Desk Top Publishing Program: Desktop publishing programs contain many of the features of word processing software, but .go even further in the ability to layout the format of