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
Diskless workstations:    Most people assume that the operating system is stored on a disk that is connected directly to the computer, but this is not necessarily true. If the

Time Sharing Time sharing allows a large number of users at various remote terminals to simultaneously use a centrally located computer for problem solving. Each user operates

construct a tree where preorder is ABCDFGE

Proposal a) Disabling Interrupts (Hardware Solution) • Every process disables all interrupts just after entering in its critical section and re-enables all interrupts just previous

Data buses: The availability of reliable digital semi-conductor technology has enabled the inter-communication task between different equipment to be significantly improved. P

Sets of individual statements making up a single code block are known as suites in Python. Composite or complex statements for example if, def while and class are those which neces

Problem 1. Obtain the truth table and a Boolean expression for the following conditions: x is 0 if any two of the three variables are 1. x is 1 for all other conditions.

Purpose of Code This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction.  The progra

Question 1 What are the features that Bash shell provides? Question 2 Explain Runlevels Question 3 Discuss the following                           1) Links 2) Doma

QUESTION (i) Define each of the following terms: a) Book trade catalogue b) Stocktaking c) Ephemera d) Contracting out e) Special library (ii) Discuss the adv