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