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
how to measure marginal utility.?

PROBLEM SOLVING USING A COMPUTER The following steps are required for solving a problem using a computer system:     Problem Definition     Program Planning (Preparati

can you help me convert binary into decimals?

why do computer have internal memory as a part of cpu and the internal bulk memory seprately?

Processor: Processor plays major role in a computer. One should carefully decide about the type of processor and its speed before making a choice. Currently Core 2 Duo process

Batch Processing When the entire computer system is dedicated to a single job, the system is said to be operating in Batch Processing mode. In this mode each program is run to

Computer Processing: Most of the earliest computer memories have been based on physical elements which can exist in just one of the two states (on or off): such an element cor

Circuit Switching: Many switching techniques are in use. One of them is line or circuit switching in which a communications path is actually established before the message is


Editor and Assembler:   To write a program in any of the programming languages requires an editor.  This is  a program that is used to create text files. While saving the p