Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OpnSrcConstruction/f973fa067a4ee6e8f88b7b08bbcdc02c to your computer and use it in GitHub Desktop.
Save OpnSrcConstruction/f973fa067a4ee6e8f88b7b08bbcdc02c to your computer and use it in GitHub Desktop.
Python Example: basic list slicing objects #python #slicing #list
'''
@author: OpnSrcConstruction
'''
# A string is just a list of string objects in Python.
# This is much simpler, than all those strict languages like C.
string_greeting = "Hello World!"
programming_community = "Python Programming"
# Print entire String.
print(string_greeting)
# Prints a blank line.
Print("\n")
# Print SubString from string_greeting.
print(string_greeting[0:] , string_greeting[0])
print(programming_community[1:6], "\n" "programming_community[1:6]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment