<filename>0-python-tutorial/07-strings-c01.py
# Demo Python Strings - String Methods
'''
String Methods

Python has a set of built-in methods that you can use on strings.

'''
# The upper() method returns the string in upper case:
a = "Hello, World!"
print("string original: ", a)
print(a.upper())

# The lower() method returns the string in lower case:
a = "Hello, World!"
print("string original: ", a)
print(a.lower())

# The strip() method removes any whitespace from the beginning or the end:
a = " Hello, World! "
print("string original: ", a)
print(a.strip())

# The replace() method replaces a string with another string:
a = "Hello, World!"
print("string original: ", a)
print(a.replace("H", "J"))

# The split() method splits the string into substrings if it finds instances of the separator:
a = "Hello, World!"
print("string original: ", a)
print(a.split(",")) # returns ['Hello', ' World!']

<filename>0-python-tutorial/07-strings-c01.py
# Demo Python Strings - String Methods
'''
String Methods

Python has a set of built-in methods that you can use on strings.

'''
# The upper() method returns the string in upper case:
a = "Hello, World!"
print("string original: ", a)
print(a.upper())

# The lower() method returns the string in lower case:
a = "Hello, World!"
print("string original: ", a)
print(a.lower())

# The strip() method removes any whitespace from the beginning or the end:
a = " Hello, World! "
print("string original: ", a)
print(a.strip())

# The replace() method replaces a string with another string:
a = "Hello, World!"
print("string original: ", a)
print(a.replace("H", "J"))

# The split() method splits the string into substrings if it finds instances of the separator:
a = "Hello, World!"
print("string original: ", a)
print(a.split(",")) # returns ['Hello', ' World!']

# Demo Python Strings - String Methods String Methods  Python has a set of built-in methods that you can use on strings. # The upper() method returns the string in upper case: # The lower() method returns the string in lower case: # The strip() method removes any whitespace from the beginning or the end: # The replace() method replaces a string with another string: # The split() method splits the string into substrings if it finds instances of the separator: # returns ['Hello', ' World!']