Python - Software Carpentry:
[Pages:31]Python
Strings
Copyright ? Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See for more information.
Strings are sequences of characters
Python
Strings
Strings are sequences of characters No separate character type: just a string of length 1
Python
Strings
Strings are sequences of characters No separate character type: just a string of length 1 Indexed exactly like lists
Python
Strings
Strings are sequences of characters No separate character type: just a string of length 1 Indexed exactly like lists
name = 'Darwin' print name[0], name[-1] D n
Python
for iterates through characters
Strings
Python
Strings
for iterates through characters
name = 'Darwin' for c in name:
print c D a r w i n
Python
Strings
Use either ' or " (as long as they match)
Python
Strings
Use either ' or " (as long as they match)
print 'Alan', "Turing" Alan Turing
Python
Strings
Use either ' or " (as long as they match)
print 'Alan', "Turing" Alan Turing
Strings are the same no matter how they're created
Python
Strings
Use either ' or " (as long as they match)
print 'Alan', "Turing" Alan Turing
Strings are the same no matter how they're created
print 'Alan' == "Alan" True
Python
Strings
Strings are compared character by character from left to right
Python
Strings
Strings are compared character by character from left to right
print 'a' < 'b' True
Python
Strings
Strings are compared character by character
from left to right
print 'a' < 'b' True print 'ab' < 'abc' True
Python
Strings
Strings are compared character by character
from left to right
print 'a' < 'b' True print 'ab' < 'abc' True print '1' < '9' True
Python
Strings
Strings are compared character by character
from left to right
print 'a' < 'b' True print 'ab' < 'abc' True print '1' < '9' True print '100' < '9' True
Python
Strings
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- python course
- python software carpentry
- python strings methods
- s python cheat sheet data science free
- a guide to f string formatting in python
- comp 150 exam 1 overview loyola university chicago
- python strings rxjs ggplot2 python data persistence
- data 301 introduction to data analytics python
- 50 examples documentation
Related searches
- software development business plan template
- software for small business management
- software company business plan template
- software company business plan
- business plan pro software download
- python software free download
- python thousands separator python 3
- carpentry calculator app free
- python including other python files
- software engineer vs software developer
- python get python file path
- run python script in python shell