Preview:
size = 30
value = 44
max_value = 100
border_l = '|'
border_r = '|'
fill = '#'
empty = '_'

bar = border_l
p = round(size*(value/max_value))
for i in range(1, p + 1):
    bar = bar + fill
ep = size - p
for i in range(1, ep + 1):
    bar = bar + empty
bar = bar + border_r

print(bar)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter