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

Python 2, 107 bytes

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

Try it online!

Jitse
  • 7.7k
  • 3
  • 19
  • 43