Last active
March 17, 2018 22:28
-
-
Save sdaaish/5d642dcc2313b9f3e016e6e5458345ae to your computer and use it in GitHub Desktop.
Python stuff
This file contains 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
# Some python testing | |
## Checkout Corey Schafer on Youtube | |
print ("hello world") | |
message = 'Hello world' | |
print(message) | |
print(len(message)) | |
print(message[0:5]) | |
multiline = ''' some long message | |
on several lines''' | |
print(multiline) | |
greeting = "Hello" | |
message = greeting + ', ' + "Some name" | |
print(message) | |
name = 'Stig' | |
message = '{}, {}.Welcome'.format(greeting,name) | |
print(message) | |
num = 100 | |
print(num + 100) | |
courses = ['History','Math','Physics','Compsci'] | |
courses_2 = ['Art', 'Education'] | |
courses.extend(courses_2) | |
courses.reverse() | |
print(courses) | |
print(courses[0:2]) | |
print(sorted(courses)) | |
print(3/2) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment