filmov
tv
Python default arguments are awesome! 👍
Показать описание
#python #tutorial #course
00:00:00 default arguments
00:03:16 exercise
# ----- EXAMPLE -----
def net_price(list_price, discount=0, tax=0.05):
return list_price * (1 - discount) * (1 - tax)
# print(net_price(500))
# print(net_price(500, 0.1))
# print(net_price(500, 0.1, 0))
# ----- EXERCISE -----
import time
def count(end, start=0):
for x in range(start, end+1):
print(x)
print("DONE!")
# count(10)
# count(30, 15)
00:00:00 default arguments
00:03:16 exercise
# ----- EXAMPLE -----
def net_price(list_price, discount=0, tax=0.05):
return list_price * (1 - discount) * (1 - tax)
# print(net_price(500))
# print(net_price(500, 0.1))
# print(net_price(500, 0.1, 0))
# ----- EXERCISE -----
import time
def count(end, start=0):
for x in range(start, end+1):
print(x)
print("DONE!")
# count(10)
# count(30, 15)
Python default arguments are awesome! 👍
Python Tutorial: Clarifying the Issues with Mutable Default Arguments
Python - Default Arguments
Python Arguments in Functions (Positional, Keywords & Default Arguments) #13
Learn Python Episode #17: Default Arguments
Default Arguments in Python
Weird Python: Mutable Default Arguments
Python Default Arguments for functions
Build Captivating Display Tables in Python With Great Tables | Real Python Podcast #214
Beginner Python Tutorial 88 - Default Parameters
Avoiding Mutable Default Arguments in Python
Python Mutable Default Parameters in 5 minutes: A common misunderstanding (and memoization)
Mutable Values as Default Arguments in Python
Defining Python Functions With Default and Optional Arguments
The Mutable Default Argument In Python
#73 Python for Beginners: Mutable Default Arguments In Python
Types of Arguments in Python | Python Tutorials for Beginners #lec61
Default Arguments in functions (Python Tutorial - Part 24)
Python keyword arguments are awesome! 🗝️
#44-PYTHON TUTORIAL | Default Arguments | TYPES OF ARGUMENTS | FUNCTIONS IN PYTHON
Python Programs #94: Default Arguments
Creating a function with default ARGUMENTS in Python.
Default Argument Value in PYTHON #python #programming
Default Parameters in Python Functions
Комментарии