Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
saved 3 + 2 bytes and corrected off by one error thanks to Leaky NumNun
lambda v,a:('*'*10)[:~-v/a/70+1]
similar to Neils answer. Uses the fact that Python2 does integer division.
saved 3 + 2 bytes and corrected off by one error thanks to Leaky Num
saved 3 + 2 bytes and corrected off by one error thanks to Leaky Nun
saved 3 + 2 bytes and corrected a one off by one error thanks to Leaky Num
saved 3 + 2 bytes and corrected a one off error thanks to Leaky Num
lambda v,a:('*'*10)[:(v~-1)v/a/70+1]
saved 3 bytes and corrected a one off error thanks to Leaky Num
lambda v,a:('*'*10)[:(v-1)/a/70+1]