# String

*noun*

say it: **“string”** **/strɪŋ/**

Text in a program, such as letters, numbers, spaces or symbols, written inside single or double quotes.

## What is a **string** in Python?

A **string** is text: letters, numbers, spaces or symbols inside quotes. Single or double quotes both work.

```python
greeting = "Hello"
item = 'coffee'
print(greeting, item)  # Hello coffee
```

## In a sentence

- “"Hello" is a **string**, and so is '42' because it's in quotes.”
- “input() always gives back a **string**, even when the user types a number.”

Level: Novice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=1)

Updated: November 19, 2026

## In other subjects

- [string in C#](https://www.ask-codey.com/glossary/string-c-sharp)
- [String in Java](https://www.ask-codey.com/glossary/string-java)
- [String in JavaScript](https://www.ask-codey.com/glossary/string-javascript-2)

Source: https://www.ask-codey.com/glossary/string
