0Pricing
Python Academy · Lesson

Strings and Type Conversion

Work with string values and convert between different data types.

Introduction

Strings in Python are immutable sequences of Unicode characters, created with single or double quotes. Type conversion lets you switch between types.

Creating Strings

Use single quotes, double quotes, or triple quotes for multi-line strings. All create the same str type.
s = 'hello'
t = "world"
ml = '''line1
line2'''

All lessons in this course

  1. Variables and Assignment
  2. Numeric and Boolean Types
  3. Strings and Type Conversion
  4. Reading User Input
← Back to Python Academy