# Basic String Methods

## Basic String Methods

```python
sentence = 'something'

sentence.upper() # Upercases the sentance variable

print(sentence) # even though the method .upper ran the string within the sentence variable is still lowercase

# To get that data working you need to assign it to a variable:
up_sen = sentence.upper
# Or re-assign it to itself
sentence = sentence.upper()
```

#### Every time you see `()` we are working with a `function` or a `method`

## Difference between function and Method:

* if there is a `.` before the word then it is a method
  * example: `sentence.upper()`
  * methods also are associated with an object

* if it is stand alone then it is a function
  * example: `print()`
  * functions are stand alone

## Some Types of methods:

* `.upper` - Uppercase letters
* `.lower` - Lowercase letters
* `.capitalize` - Capitalizez first letter and lowercase the rest
* `.isdigit` - Checks if the string is a digit and returns a boolean value (True or False)
* There are multiple methods starting with `is` - Used to check: `is something like that?`
* There are multiple methods starting with `startswith()`
  * expects string
* Similar to `startswith` there is also `endswith()`
  * expects string
*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/programming/courses/python-pcap-31-03-course/overview-and-introduction/basic-string-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
