모든 강좌
초급 18 hours 무료

Python Basics: From Zero to Code

Learn Python from scratch: syntax, variables, strings, operators, control flow, collections, functions and the standard library. Perfect for beginners with no programming experience.

강좌 시작
코스 배지 Python Basics 모든 레슨을 완료하면 받을 수 있어요.
Python Basics: From Zero to Code

강좌 내용

모듈 1

Getting started

5 레슨
1

Introduction to Python

What Python is, what it's used for, how to install it and how to run your first program.

20 min 무료
2

Syntax, output and comments

The basic rules for writing Python: indentation, statements, how to display text and numbers with print() and how to comment your code.

25 min 무료
3

Variables

How to create variables, the rules for naming them, assigning several values at once, printing them, and the difference between local and global variables.

30 min 무료
4

Data types and numbers

The data types built into Python, how to check a value's type, and an in-depth look at the three numeric types: int, float and complex.

30 min 무료
5

Casting and user input

Convert values between types with int(), float() and str(), and ask the user for data with input() to build interactive programs.

30 min 무료
모듈 2

Strings

4 레슨
6

Strings: the basics

How to create text in Python, multiline strings, accessing each character, measuring length and searching for words inside a text.

25 min 무료
7

Slicing and modifying strings

Extract parts of a text with slicing, use negative indexes and transform strings with upper(), lower(), strip(), replace() and split().

25 min 무료
8

Concatenation, f-strings and escape characters

Join text with +, insert variables and expressions with f-strings, control decimals and use escape characters for quotes, line breaks and tabs.

30 min 무료
9

String methods

The methods Python provides to transform, search, validate, align, split and join text, with a complete reference table.

35 min 무료
모듈 3

Booleans and operators

4 레슨
10

Booleans

The values True and False, how comparisons produce them, which values Python treats as true or false, and how to use them to make decisions.

20 min 무료
11

Arithmetic and assignment operators

What an operator is, Python's seven math operations and the shortcuts for updating variables like += and -=, including the walrus operator.

25 min 무료
12

Comparison, logical, identity and membership operators

Compare values, combine conditions with and, or and not, tell == apart from is, and look for items with in.

30 min 무료
13

Bitwise, ternary and operator precedence

Work directly with a number's bits, write one-line decisions with the ternary operator and understand the order in which Python evaluates an expression.

30 min 무료
모듈 4

Control flow

4 레슨
14

Conditionals: if, elif and else

Make your program decide with if, elif and else, combine conditions, nest decisions and learn the short forms and the pass statement.

30 min 무료
15

The match statement

Compare a value against several cases with match and case: the default case, several values per case, extra conditions and tuple patterns.

20 min 무료
16

While loops

Repeat code while a condition holds, avoid infinite loops and control the loop with break, continue and else.

25 min 무료
17

For loops and range()

Loop through lists and text with for, generate number sequences with range(), and use break, continue, else and nested loops.

30 min 무료
모듈 5

Data collections

8 레슨
18

Lists: creating and accessing

What a list is, its characteristics, how to create it, measure it and read its items with indexes and ranges, and how it compares to Python's other collections.

25 min 무료
19

Lists: changing, adding and removing

Change items or ranges in a list, add with append(), insert() and extend(), and remove with remove(), pop(), del and clear().

25 min 무료
20

Lists: looping and comprehensions

The different ways to loop through a list with for and while, and how to create new lists in a single line with list comprehensions.

30 min 무료
21

Lists: sorting, copying, joining and methods

Sort lists with sort() and sorted(), copy them without surprises, join them, learn every list method and understand how lists relate to arrays.

35 min 무료
22

Tuples

Ordered collections that can't be changed: how to create them, access, 'update', unpack, loop through and join them, and their two methods.

30 min 무료
23

Sets and frozensets

Unordered collections without duplicates: how to create them, add and remove items, loop through them, combine them with union, intersection and difference, and the immutable frozenset.

35 min 무료
24

Dictionaries: creating, accessing and changing

Store data as key-value pairs: create dictionaries, read values with [] and get(), get keys and values, and change, add and remove items.

30 min 무료
25

Dictionaries: looping, copying, nesting and methods

Loop through keys, values and pairs, copy dictionaries safely, organize data in nested dictionaries and learn every method plus dict comprehensions.

35 min 무료
모듈 6

Functions

5 레슨
26

Functions and arguments

Create your own functions with def, pass them arguments, use default values and keyword arguments, and return results with return.

35 min 무료
27

*args, **kwargs and scope

Functions that accept any number of arguments, positional-only and keyword-only arguments, and where each variable lives: local, global and nonlocal scope.

35 min 무료
28

Lambda functions and recursion

Write one-line functions with lambda, use them with sorted(), map() and filter(), and solve problems with functions that call themselves.

35 min 무료
29

Decorators

Add behavior to a function without changing it: functions as values, the @ syntax, decorators with arguments, return values, functools.wraps and stacked decorators.

35 min 무료
30

Iterators and generators

What happens inside a for loop: iterables, iterators, iter() and next(), how to build your own iterator, and generators with yield to produce values on demand.

35 min 무료
모듈 7

Tools and the standard library

7 레슨
31

Error handling: try and except

Keep your program from stopping on an error: catch exceptions with try and except, tell error types apart, use else and finally, and raise your own errors with raise.

30 min 무료
32

None and advanced string formatting

The None value for representing the absence of a value, and every formatting option: thousands separators, percentages, alignment, padding and the format() method.

30 min 무료
33

Modules and math

Organize your code into modules, import them in different ways, explore Python's built-in modules and use the math functions and the math module.

30 min 무료
34

Dates and times

Work with dates using the datetime module: get the current date, create dates, format them with strftime(), parse them from text and do math with timedelta.

30 min 무료
35

JSON

The standard format for exchanging data: turn JSON into Python with loads(), Python into JSON with dumps(), make it readable and save it to or read it from files.

25 min 무료
36

Regular expressions

Search, validate and replace text patterns with the re module: findall, search, split and sub, metacharacters, special sequences, sets and the Match object.

40 min 무료
37

PIP and virtual environments

Install third-party libraries with pip, save your project's dependencies in requirements.txt and isolate each project in its own virtual environment.

30 min 무료

디지털 존재감을 만들어 보세요

오늘 시작하세요. 메시지를 보내 주시면 24시간 이내에 답변드려요.