print("hello, world")hello, world
Note: View the source of this document along with unformatted python codes by clicking
</> Codeon top-right corner to compare.
print("hello, world")hello, world
def is_unique(s):
s = list(s)
s.sort()
for i in range(len(s) - 1):
if s[i] == s[i + 1]:
return 0
else:
return 1black defaults to 88 character per line. But you can change this default behavior by specifying line-length in the pyproject.toml file.
pyproject.toml
[tool.black]
line-length = 40This extension works on non executable code blocks (i.e. {.python}) too.
def example_function(
arg_1: str,
arg_2: bool,
arg_3: int = 0,
arg_4: int = 1,
arg_5: float = 0.0,
):
passdef function(
name,
default=None,
*args,
variable="1123",
a,
b,
c,
employee,
office,
d,
e,
f,
**kwargs
):
"""This is function is created to demonstrate black"""
pass