Skip to content

Instantly share code, notes, and snippets.

@sdaaish
Last active March 17, 2018 22:28
Show Gist options
  • Save sdaaish/5d642dcc2313b9f3e016e6e5458345ae to your computer and use it in GitHub Desktop.
Save sdaaish/5d642dcc2313b9f3e016e6e5458345ae to your computer and use it in GitHub Desktop.
Python stuff
# 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