ECS 10 Lecture Notes - Lecture 3: Length Function, Substring

53 views3 pages

Document Summary

// ). the difference in these is crucial to math operations. With python you can specifically pull a string character using an index number. Negative indexing could be used which has the same concept as regular indexing, except it starts from the right and moves to the left. You can always use positive indexing if you want, using length in combination will make the process much easier. If you try to go out of the bounds of the string with index you will receive an error message. The length of a string can be found using the length function. A great way to get help is to type help( ) and type the function you will need help with. this will call a set of information to help you working with. Slicing is a way to allow us to create a substring from an actual string.

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

Related Questions