python string subscript code example Example: substring python string = "freeCodeCamp" print(string[0:5])