Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
# b_nth_diamond.py
here2share
Apr 11th, 2021
(
edited
)
842
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.19 KB
| None
|
0
0
raw
download
clone
embed
print
report
# b_nth_diamond.py
def
nth_diamond
(
nth
)
:
s
=
[
]
for
j
in
range
(
nth+
1
)
:
t
=
' '
+
' '
*
(
nth-j
)
+
'* '
*j
s +
=
[
t
]
s
=
s
[
:-
1
]
+s
[
::-
1
]
return
'
\n
'
.
join
(
s
)
print
nth_diamond
(
5
)
Add Comment
Please,
Sign In
to add comment
Public Pastes
pastebin.ai - #1 pastebin alternative
PHP | 12 min ago | 0.81 KB
computercraft test script
Lua | 35 min ago | 2.12 KB
rps
JSON | 41 min ago | 4.14 KB
Untitled
Go | 47 min ago | 0.52 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 💰
GetText | 47 min ago | 0.38 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 53 min ago | 0.39 KB
2024-04-26_stats.json
JSON | 53 min ago | 4.16 KB
2024-04-26_stats.json
JSON | 55 min ago | 4.15 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!