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
can you help me to do my assembly program homework

QUESTION (a) What is an abstract data type? (b) Give two limitations of the array implementation of lists. (c) Give the major disadvantage of the dynamic implementation o

Question 1: (a) How would you describe human reasoning? (b) Describe the different types of human reasoning? Question 2: (a) What are the computational factors affec

Working of a Computer Computer may be divided into the following units     Input Unit     Main Memory or Primary Storage Unit     Arithmetic-Logic Unit

Problem 1 Research designs have a critical and directive role to play in the research process. Explain the meaning of research design. Describe the various types of research de

To make a program in assembler two choices exist, the earliest one is to use the TASM or Turbo Assembler, of Borland, and the next one is to use the debugger, generally we use this

Indexing a page on internet: Once, the spiders have completed the task of finding information about Web pages, the search engine must store the information in such way that yo

Data communication as a need developed in the 1960s with the interconnection of peripheral devices to mainframe computers. Within the immediate vicinity of the mainframe computer t

What''s a resource based view of Apple Corporation?

Internal interruptions are produced by convinced events which come during the execution of a program. These types of interruptions are handled on their totality by the hardware and