Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
PYTHON LAB 1b
Ashies
Oct 4th, 2017
43
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.23 KB
| None
|
0
0
raw
download
clone
embed
print
report
def
right_justify
(
s
)
:
l
=
len
(
s
)
ss
=
s.
zfill
(
70
)
ll
=
len
(
ss
)
lll
=
ll-l
print
(
lll
)
x
=
ss
[
0
:lll
]
x
=
x.
replace
(
"0"
,
" "
)
print
(
x
)
ans
=
x+s
print
(
ans
)
s
=
input
(
"Enter any string
\n
"
)
right_justify
(
s
)
Add Comment
Please,
Sign In
to add comment
Public Pastes
shortMine.lua
Lua | 25 min ago | 0.60 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 36 min ago | 0.39 KB
Pastebin.ai - #1 Pastebin Alternative
PHP | 1 hour ago | 0.83 KB
Untitled
Bash | 1 hour ago | 0.44 KB
Work Skin Ama
CSS | 1 hour ago | 2.31 KB
Startup.lua / Passwords
Lua | 1 hour ago | 4.14 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🎁
GetText | 1 hour ago | 0.38 KB
Tree Planter
Lua | 2 hours ago | 1.67 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!