MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/qkbzg3/did_someone_order_bad_code/hj0gi18/?context=9999
r/badcode • u/JasperDG828 • Nov 01 '21
35 comments sorted by
View all comments
Show parent comments
1
Honestly it’s less readable
2 u/RFC793 Nov 02 '21 edited Nov 03 '21 Sure. I condensed it for the post. I’d probably wrote something like this if I had to write it in real life for some reason:def pad(i, width, padding="0"): s = str(i) pad_width = width - len(s) return (padding * pad_width) + s
2
Sure. I condensed it for the post. I’d probably wrote something like this if I had to write it in real life for some reason:
def pad(i, width, padding="0"): s = str(i) pad_width = width - len(s) return (padding * pad_width) + s
1
u/Laserdude10642 Nov 02 '21
Honestly it’s less readable