Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Strings in Python

Slicing & Immutability

s = 'hello world'
print(s[0:5])      # 'hello'
print(s[::-1])     # 'dlrow olleh'
s[0] = 'H'         # Error! Strings are immutable.

Useful Methods

print(s.upper())
print(s.split())