Created
April 9, 2019 20:57
-
-
Save OpnSrcConstruction/657e81acd884b711c548e1f5d9090168 to your computer and use it in GitHub Desktop.
Python beginer examples: string Trix #python #string #indexing
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
''' | |
@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]") | |
# OUTPUT: | |
# | |
# Hello World! | |
# | |
# Hello H | |
# | |
# Python | |
# programming_community[1:6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment