CSE 1010 Lecture Notes - Lecture 3: Substring, Empty String

38 views2 pages
jadetortoise401 and 55 others unlocked
CSE 1010 Full Course Notes
84
CSE 1010 Full Course Notes
Verified Note
84 documents

Document Summary

A string is a sequence of 0 or more characters delimited by single quotes or double quotes. Inside of any of the pairs of quotes, there are special character sequences, beginning with a backslash (\), which are interpreted in a special way. Inserting a \ in the middle of string tells python that the next character will have a special meaning. \n: end the current line of text and start a new one. : skip to the net tab stop in the text. Python provides what are called raw strings, in which the special characters have no special meaning. Raw strings are used by adding either r or r before the first quote. Concatenation: the addition operator + takes on the role of concatenation when used with strings. Repetition: a string can be repeated by the value of an integer with * operator. Indexing: strings can be indexed, with the first character having index 0.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents