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
My son has a project assignment he has problem with. The only thing is, it is due in 20 mins. can someone be able to help him? if so, how much is the fee?

Memory unit of computer: The Memory  unit is an important component of a computer where all the data and information are stored in the form  of binary digits (combination of 0

Read only memory (rom): The problem with RAM is that its memory is volatile, i.e. it loses all its data when the power supply is removed.  A non-volatile memory is a permanent

Hi, I''m looking for someone to help me with Computer Science ASAP. How soon are you available? Thanks! Specifically using the Racket program dealing with creating a list that will

Different kinds of registers are general between most microprocessor designs. These are: Program Counter (PC) This register is utilized to hold the memory address of the next instr

Why we need data mining? Give an example to illustrate your answer.

Creating a new file For the formation of files the 21H interruption 16H function is used. DX must identify a control structure whose necessities are that as a minimum the logic uni

• The key to preventing problem involving shared storage is get some way to prohibit more than one process from reading and writing the shared data concurrently. That part of the p

whats the out put of int main(){ int n=310; funcone(n); functwo(&n); cout return 0; } void funcone(intn) n=240; } void func two(intn*) { n=120; }

Execute a command in operating system: In order to execute a command OS does the following steps:   It accepts a command from a user through mouse clicks or from t