Skip to main content
10 of 10
deleted 7 characters in body
Jitse
  • 7.7k
  • 3
  • 19
  • 43

Python 2, 99 bytes

def a(s):s=s[1:]or'0';l=len(s);print('#'+(l/4*s[-1]).join(i+i*(l==3)for i in(l<5)*6*s)+s+s[-1])[:7]

Try it online!

Jitse
  • 7.7k
  • 3
  • 19
  • 43