<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Strings
Strings play a major role in a programming language. Apart from providing nicer user interactions, they can also serve as communication tool within the parts of the program. Python provides a rich set of tools for Pattern matching using RegExs, String formatting based on locate and Various encryption methods. We have seen basic String Formatting in previous chapter. In this chapter let's study about some basic functions that operates on strings.
Creating Strings
Creating Empty String
python
    s = str()
    or
python
    s = '' # quotes can be any of '' or ""
- Creating String with Initial Value
python
    s = "Some text goes here"
Accessing the elements of Strings
String elements can be accessed using integer indices. A slice can also be specified for accessing a required part of the string
Step1:  Operators on Strings
Step2:  Operations on Strings
If s is a string,
s.format(elements) formats s and returns it
s.join(elements) returns a string in which the elements have been joined by s separator.
s.capitalize() Return a copy of the string with its first character capitalized and the rest lowercased.
s.count(sub[, start[, end]]) Return the number of non-overlapping occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation.
s.find(sub[, start[, end]]) Return the lowest index in the string where substring sub is found within the slice s[start
<ASSISTANT_TASK:>
Python Code:
s = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"
s
s[10]
s[20:] # start from 10 to end of string
s[:20] # start from 0 to index 19
s[10:30:2] # start from 10, end at 29 with steps of 2
s[30:10:-2] # in reverse order
Explanation: Strings
Strings play a major role in a programming language. Apart from providing nicer user interactions, they can also serve as communication tool within the parts of the program. Python provides a rich set of tools for Pattern matching using RegExs, String formatting based on locate and Various encryption methods. We have seen basic String Formatting in previous chapter. In this chapter let's study about some basic functions that operates on strings.
Creating Strings
Creating Empty String
python
    s = str()
    or
python
    s = '' # quotes can be any of '' or ""
- Creating String with Initial Value
python
    s = "Some text goes here"
Accessing the elements of Strings
String elements can be accessed using integer indices. A slice can also be specified for accessing a required part of the string
End of explanation
'Lorem' in s
'Some Random text : ' + s
for i,c in enumerate(s): # string is iterable
    if i == 11:
        break 
    else:
        print(c,end='') 
Explanation: Operators on Strings
End of explanation
s
s.count('it')
s.find('it')
s.split(',')
part = s.split(',')[2]
part
part = part.strip()
part
part = part.upper()
part
'-'.join('defg')
s = 'abcd'
s += 'defg'        # Appending
s
Explanation: Operations on Strings
If s is a string,
s.format(elements) formats s and returns it
s.join(elements) returns a string in which the elements have been joined by s separator.
s.capitalize() Return a copy of the string with its first character capitalized and the rest lowercased.
s.count(sub[, start[, end]]) Return the number of non-overlapping occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation.
s.find(sub[, start[, end]]) Return the lowest index in the string where substring sub is found within the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found.
s.isalpha() Return True if all characters in the string are alphabetic and there is at least one character, False otherwise. 
s.split(sep=None, maxsplit=-1) Return a list of the words in the string, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done (thus, the list will have at most maxsplit+1 elements). If maxsplit is not specified or -1, then there is no limit on the number of splits (all possible splits are made).
s.strip([chars]) Return a copy of the string with the leading and trailing characters removed. The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped
End of explanation
<END_TASK>