Last active
April 11, 2017 21:19
-
-
Save romach/26287b53f48e9c0a50f69bd95bf4e07a to your computer and use it in GitHub Desktop.
String operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get letter by index | |
"Word"[0] => "W" | |
# Length | |
"Word".len() => 4 | |
# To lower case | |
"Word".lower() => "word" | |
# To upper case | |
"Word".upper() => "WORD" | |
# Convert to string | |
str(2) => "2" | |
# print string | |
print "Word" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment